activemq-cpp-3.9.5
Command.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _ACTIVEMQ_COMMANDS_COMMAND_H_
19#define _ACTIVEMQ_COMMANDS_COMMAND_H_
20
21#include <string>
25#include <decaf/lang/Pointer.h>
26
27namespace activemq{
28namespace state{
29 class CommandVisitor;
30}
31namespace commands{
32
34 public:
35
36 virtual ~Command() {}
37
42 virtual void setCommandId( int id ) = 0;
43
48 virtual int getCommandId() const = 0;
49
54 virtual void setResponseRequired( const bool required ) = 0;
55
60 virtual bool isResponseRequired() const = 0;
61
66 virtual std::string toString() const = 0;
67
77
78 /*
79 * This section contains a set of short-cut methods for determining if a
80 * Command is of a certain type. These are the most commonly used Commands
81 * and we save several casts and some ugly code by just adding these here.
82 */
83 virtual bool isBrokerInfo() const = 0;
84 virtual bool isControlCommand() const = 0;
85 virtual bool isConnectionControl() const = 0;
86 virtual bool isConnectionInfo() const = 0;
87 virtual bool isConnectionError() const = 0;
88 virtual bool isConsumerInfo() const = 0;
89 virtual bool isConsumerControl() const = 0;
90 virtual bool isDestinationInfo() const = 0;
91 virtual bool isFlushCommand() const = 0;
92 virtual bool isKeepAliveInfo() const = 0;
93 virtual bool isMessage() const = 0;
94 virtual bool isMessageAck() const = 0;
95 virtual bool isMessagePull() const = 0;
96 virtual bool isMessageDispatch() const = 0;
97 virtual bool isMessageDispatchNotification() const = 0;
98 virtual bool isProducerAck() const = 0;
99 virtual bool isProducerInfo() const = 0;
100 virtual bool isResponse() const = 0;
101 virtual bool isReplayCommand() const = 0;
102 virtual bool isRemoveInfo() const = 0;
103 virtual bool isRemoveSubscriptionInfo() const = 0;
104 virtual bool isSessionInfo() const = 0;
105 virtual bool isShutdownInfo() const = 0;
106 virtual bool isTransactionInfo() const = 0;
107 virtual bool isWireFormatInfo() const = 0;
108
109 };
110
111}}
112
113#endif /*_ACTIVEMQ_COMMANDS_COMMAND_H_*/
#define AMQCPP_API
Definition Config.h:30
Definition BaseDataStructure.h:33
Definition Command.h:33
virtual bool isShutdownInfo() const =0
virtual bool isRemoveInfo() const =0
virtual bool isConsumerControl() const =0
virtual bool isDestinationInfo() const =0
virtual bool isResponseRequired() const =0
Is a Response required for this Command.
virtual bool isConnectionInfo() const =0
virtual decaf::lang::Pointer< commands::Command > visit(activemq::state::CommandVisitor *visitor)=0
Allows a Visitor to visit this command and return a response to the command based on the command type...
virtual int getCommandId() const =0
Gets the Command Id of this Message.
virtual bool isMessageAck() const =0
virtual bool isMessagePull() const =0
virtual void setCommandId(int id)=0
Sets the Command Id of this Message.
virtual bool isMessage() const =0
virtual bool isBrokerInfo() const =0
virtual bool isConsumerInfo() const =0
virtual bool isConnectionError() const =0
virtual bool isResponse() const =0
virtual bool isTransactionInfo() const =0
virtual bool isSessionInfo() const =0
virtual std::string toString() const =0
Returns a provider-specific string that provides information about the contents of the command.
virtual bool isProducerInfo() const =0
virtual bool isFlushCommand() const =0
virtual bool isKeepAliveInfo() const =0
virtual bool isConnectionControl() const =0
virtual bool isMessageDispatch() const =0
virtual bool isProducerAck() const =0
virtual ~Command()
Definition Command.h:36
virtual bool isReplayCommand() const =0
virtual bool isMessageDispatchNotification() const =0
virtual bool isWireFormatInfo() const =0
virtual void setResponseRequired(const bool required)=0
Set if this Message requires a Response.
virtual bool isControlCommand() const =0
virtual bool isRemoveSubscriptionInfo() const =0
Interface for an Object that can visit the various Command Objects that are sent from and to this cli...
Definition CommandVisitor.h:69
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition Pointer.h:53
Definition ActiveMQBlobMessage.h:28
Definition Command.h:28
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24