001/**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.activemq.state;
018
019import org.apache.activemq.command.BrokerInfo;
020import org.apache.activemq.command.BrokerSubscriptionInfo;
021import org.apache.activemq.command.ConnectionControl;
022import org.apache.activemq.command.ConnectionError;
023import org.apache.activemq.command.ConnectionId;
024import org.apache.activemq.command.ConnectionInfo;
025import org.apache.activemq.command.ConsumerControl;
026import org.apache.activemq.command.ConsumerId;
027import org.apache.activemq.command.ConsumerInfo;
028import org.apache.activemq.command.ControlCommand;
029import org.apache.activemq.command.DestinationInfo;
030import org.apache.activemq.command.FlushCommand;
031import org.apache.activemq.command.KeepAliveInfo;
032import org.apache.activemq.command.Message;
033import org.apache.activemq.command.MessageAck;
034import org.apache.activemq.command.MessageDispatch;
035import org.apache.activemq.command.MessageDispatchNotification;
036import org.apache.activemq.command.MessagePull;
037import org.apache.activemq.command.ProducerAck;
038import org.apache.activemq.command.ProducerId;
039import org.apache.activemq.command.ProducerInfo;
040import org.apache.activemq.command.RemoveSubscriptionInfo;
041import org.apache.activemq.command.Response;
042import org.apache.activemq.command.SessionId;
043import org.apache.activemq.command.SessionInfo;
044import org.apache.activemq.command.ShutdownInfo;
045import org.apache.activemq.command.TransactionInfo;
046import org.apache.activemq.command.WireFormatInfo;
047
048public interface CommandVisitor {
049
050    Response processAddConnection(ConnectionInfo info) throws Exception;
051
052    Response processAddSession(SessionInfo info) throws Exception;
053
054    Response processAddProducer(ProducerInfo info) throws Exception;
055
056    Response processAddConsumer(ConsumerInfo info) throws Exception;
057
058    Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId) throws Exception;
059
060    Response processRemoveSession(SessionId id, long lastDeliveredSequenceId) throws Exception;
061
062    Response processRemoveProducer(ProducerId id) throws Exception;
063
064    Response processRemoveConsumer(ConsumerId id, long lastDeliveredSequenceId) throws Exception;
065
066    Response processAddDestination(DestinationInfo info) throws Exception;
067
068    Response processRemoveDestination(DestinationInfo info) throws Exception;
069
070    Response processRemoveSubscription(RemoveSubscriptionInfo info) throws Exception;
071
072    Response processMessage(Message send) throws Exception;
073
074    Response processMessageAck(MessageAck ack) throws Exception;
075
076    Response processMessagePull(MessagePull pull) throws Exception;
077
078    Response processBeginTransaction(TransactionInfo info) throws Exception;
079
080    Response processPrepareTransaction(TransactionInfo info) throws Exception;
081
082    Response processCommitTransactionOnePhase(TransactionInfo info) throws Exception;
083
084    Response processCommitTransactionTwoPhase(TransactionInfo info) throws Exception;
085
086    Response processRollbackTransaction(TransactionInfo info) throws Exception;
087
088    Response processWireFormat(WireFormatInfo info) throws Exception;
089
090    Response processKeepAlive(KeepAliveInfo info) throws Exception;
091
092    Response processShutdown(ShutdownInfo info) throws Exception;
093
094    Response processFlush(FlushCommand command) throws Exception;
095
096    Response processBrokerInfo(BrokerInfo info) throws Exception;
097
098    Response processBrokerSubscriptionInfo(BrokerSubscriptionInfo info) throws Exception;
099
100    Response processRecoverTransactions(TransactionInfo info) throws Exception;
101
102    Response processForgetTransaction(TransactionInfo info) throws Exception;
103
104    Response processEndTransaction(TransactionInfo info) throws Exception;
105
106    Response processMessageDispatchNotification(MessageDispatchNotification notification) throws Exception;
107
108    Response processProducerAck(ProducerAck ack) throws Exception;
109
110    Response processMessageDispatch(MessageDispatch dispatch) throws Exception;
111
112    Response processControlCommand(ControlCommand command) throws Exception;
113
114    Response processConnectionError(ConnectionError error) throws Exception;
115
116    Response processConnectionControl(ConnectionControl control) throws Exception;
117
118    Response processConsumerControl(ConsumerControl control) throws Exception;
119
120}