/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef _ACTIVEMQ_STATE_COMMANDVISITOR_H_ #define _ACTIVEMQ_STATE_COMMANDVISITOR_H_ #include #include #include namespace activemq { namespace commands { class Command; class ConnectionInfo; class SessionInfo; class ProducerInfo; class ConnectionId; class SessionId; class ProducerId; class ConsumerId; class ConsumerInfo; class DestinationInfo; class RemoveSubscriptionInfo; class Message; class MessageAck; class MessagePull; class TransactionInfo; class WireFormatInfo; class ProducerAck; class MessageDispatch; class MessageDispatchNotification; class ControlCommand; class ConnectionError; class ConnectionControl; class ConsumerControl; class ShutdownInfo; class KeepAliveInfo; class FlushCommand; class BrokerError; class BrokerInfo; class RemoveInfo; class Response; class ReplayCommand; } namespace state { /** * Interface for an Object that can visit the various Command Objects that * are sent from and to this client. The Commands themselves implement a * visit method that is called with an instance of this interface * and each one then call the appropriate processXXX method. * * @since 3.0 */ class AMQCPP_API CommandVisitor { public: virtual ~CommandVisitor(); virtual decaf::lang::Pointer processTransactionInfo(commands::TransactionInfo* info) = 0; virtual decaf::lang::Pointer processRemoveInfo(commands::RemoveInfo* info) = 0; virtual decaf::lang::Pointer processConnectionInfo(commands::ConnectionInfo* info) = 0; virtual decaf::lang::Pointer processSessionInfo(commands::SessionInfo* info) = 0; virtual decaf::lang::Pointer processProducerInfo(commands::ProducerInfo* info) = 0; virtual decaf::lang::Pointer processConsumerInfo(commands::ConsumerInfo* info) = 0; virtual decaf::lang::Pointer processRemoveConnection(commands::ConnectionId* id) = 0; virtual decaf::lang::Pointer processRemoveSession(commands::SessionId* id) = 0; virtual decaf::lang::Pointer processRemoveProducer(commands::ProducerId* id) = 0; virtual decaf::lang::Pointer processRemoveConsumer(commands::ConsumerId* id) = 0; virtual decaf::lang::Pointer processDestinationInfo(commands::DestinationInfo* info) = 0; virtual decaf::lang::Pointer processRemoveDestination(commands::DestinationInfo* info) = 0; virtual decaf::lang::Pointer processRemoveSubscriptionInfo(commands::RemoveSubscriptionInfo* info) = 0; virtual decaf::lang::Pointer processMessage(commands::Message* send) = 0; virtual decaf::lang::Pointer processMessageAck(commands::MessageAck* ack) = 0; virtual decaf::lang::Pointer processMessagePull(commands::MessagePull* pull) = 0; virtual decaf::lang::Pointer processBeginTransaction(commands::TransactionInfo* info) = 0; virtual decaf::lang::Pointer processPrepareTransaction(commands::TransactionInfo* info) = 0; virtual decaf::lang::Pointer processCommitTransactionOnePhase(commands::TransactionInfo* info) = 0; virtual decaf::lang::Pointer processCommitTransactionTwoPhase(commands::TransactionInfo* info) = 0; virtual decaf::lang::Pointer processRollbackTransaction(commands::TransactionInfo* info) = 0; virtual decaf::lang::Pointer processWireFormat(commands::WireFormatInfo* info) = 0; virtual decaf::lang::Pointer processKeepAliveInfo(commands::KeepAliveInfo* info) = 0; virtual decaf::lang::Pointer processShutdownInfo(commands::ShutdownInfo* info) = 0; virtual decaf::lang::Pointer processFlushCommand(commands::FlushCommand* command) = 0; virtual decaf::lang::Pointer processBrokerInfo(commands::BrokerInfo* info) = 0; virtual decaf::lang::Pointer processRecoverTransactions(commands::TransactionInfo* info) = 0; virtual decaf::lang::Pointer processForgetTransaction(commands::TransactionInfo* info) = 0; virtual decaf::lang::Pointer processEndTransaction(commands::TransactionInfo* info) = 0; virtual decaf::lang::Pointer processMessageDispatchNotification(commands::MessageDispatchNotification* notification) = 0; virtual decaf::lang::Pointer processProducerAck(commands::ProducerAck* ack) = 0; virtual decaf::lang::Pointer processMessageDispatch(commands::MessageDispatch* dispatch) = 0; virtual decaf::lang::Pointer processControlCommand(commands::ControlCommand* command) = 0; virtual decaf::lang::Pointer processConnectionError(commands::ConnectionError* error) = 0; virtual decaf::lang::Pointer processConnectionControl(commands::ConnectionControl* control) = 0; virtual decaf::lang::Pointer processConsumerControl(commands::ConsumerControl* control) = 0; virtual decaf::lang::Pointer processBrokerError(commands::BrokerError* error) = 0; virtual decaf::lang::Pointer processReplayCommand(commands::ReplayCommand* replay) = 0; virtual decaf::lang::Pointer processResponse(commands::Response* response) = 0; }; }} #endif /*_ACTIVEMQ_STATE_COMMANDVISITOR_H_*/