activemq-cpp-3.9.5
WireFormatInfo.h
Go to the documentation of this file.
1
17
18#ifndef _ACTIVEMQ_COMMANDS_WIREFORMATINFO_H_
19#define _ACTIVEMQ_COMMANDS_WIREFORMATINFO_H_
20
25
26#include <vector>
27
28namespace activemq{
29namespace commands{
30
32 private:
33
34 std::vector<unsigned char> magic;
35 std::vector<unsigned char> marshalledProperties;
36
41 util::PrimitiveMap properties;
42
46 int version;
47
48 public:
49
50 const static unsigned char ID_WIREFORMATINFO = 1;
51
52 public:
53
55
56 virtual ~WireFormatInfo();
57
58 virtual unsigned char getDataStructureType() const;
59
61
62 virtual void copyDataStructure( const DataStructure* src );
63
64 virtual std::string toString() const;
65
66 virtual bool equals( const DataStructure* value ) const;
67
68 virtual bool isMarshalAware() const {
69 return true;
70 }
71
74
79 int getVersion() const {
80 return version;
81 }
82
87 void setVersion( int version ) {
88 this->version = version;
89 }
90
95 long long getMaxInactivityDuration() const;
96
101 void setMaxInactivityDuration( long long maxInactivityDuration );
102
108
113 void setMaxInactivityDurationInitalDelay( long long maxInactivityDurationInitalDelay );
114
120
125 void setStackTraceEnabled( bool stackTraceEnabled );
126
132
137 void setTcpNoDelayEnabled( bool tcpNoDelayEnabled );
138
143 bool isCacheEnabled() const;
144
149 void setCacheEnabled( bool cacheEnabled );
150
155 int getCacheSize() const;
156
161 void setCacheSize( int value );
162
168
173 void setTightEncodingEnabled( bool tightEncodingEnabled );
174
180
185 void setSizePrefixDisabled( bool sizePrefixDisabled );
186
191 const std::vector<unsigned char>& getMagic() const {
192 return magic;
193 }
194
199 void setMagic( const std::vector<unsigned char>& magic ) {
200 this->magic = magic;
201 }
202
207 const std::vector<unsigned char>& getMarshalledProperties() const {
208 return marshalledProperties;
209 }
210
217 void setMarshalledProperties( const std::vector<unsigned char>& marshalledProperties ) {
218 this->marshalledProperties = marshalledProperties;
219 }
220
225 virtual const util::PrimitiveMap& getProperties() const {
226 return properties;
227 }
228
234 return properties;
235 }
236
241 virtual void setProperties( const util::PrimitiveMap& map ) {
242 this->properties.copy( map );
243 }
244
249 bool isValid() const;
250
254 virtual bool isWireFormatInfo() const {
255 return true;
256 }
257
258 public:
259
260 virtual void beforeMarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED );
261
262 virtual void afterUnmarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED );
263
264 };
265
266}}
267
268#endif /*_ACTIVEMQ_COMMANDS_WIREFORMATINFO_H_*/
#define AMQCPP_API
Definition Config.h:30
BaseCommand()
Definition BaseCommand.h:35
Definition DataStructure.h:27
void setStackTraceEnabled(bool stackTraceEnabled)
Sets if the stackTraceEnabled flag is on.
void setMaxInactivityDurationInitalDelay(long long maxInactivityDurationInitalDelay)
Sets the Max inactivity initial delay duration value.
virtual const util::PrimitiveMap & getProperties() const
Gets the Properties for this Command.
Definition WireFormatInfo.h:225
const std::vector< unsigned char > & getMarshalledProperties() const
Get the marshalledProperties field.
Definition WireFormatInfo.h:207
virtual void afterUnmarshal(wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
long long getMaxInactivityDuration() const
Returns the currently configured Max Inactivity duration.
virtual decaf::lang::Pointer< commands::Command > visit(activemq::state::CommandVisitor *visitor)
Allows a Visitor to visit this command and return a response to the command based on the command type...
void setCacheSize(int value)
Sets the Cache Size setting.
const std::vector< unsigned char > & getMagic() const
Get the Magic field.
Definition WireFormatInfo.h:191
bool isCacheEnabled() const
Checks if the cacheEnabled flag is on.
bool isStackTraceEnabled() const
Checks if the stackTraceEnabled flag is on.
virtual std::string toString() const
Returns a string containing the information for this DataStructure such as its type and value of its ...
void setTightEncodingEnabled(bool tightEncodingEnabled)
Sets if the tightEncodingEnabled flag is on.
void setVersion(int version)
Set the current Wireformat Version.
Definition WireFormatInfo.h:87
virtual void beforeMarshal(wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
virtual void copyDataStructure(const DataStructure *src)
Copy the contents of the passed object into this objects members, overwriting any existing data.
void setMagic(const std::vector< unsigned char > &magic)
Sets the value of the magic field.
Definition WireFormatInfo.h:199
int getVersion() const
Get the current Wireformat Version.
Definition WireFormatInfo.h:79
virtual DataStructure * cloneDataStructure() const
Clone this obbject and return a new instance that the caller now owns, this will be an exact copy of ...
virtual unsigned char getDataStructureType() const
Get the DataStructure Type as defined in CommandTypes.h.
bool isSizePrefixDisabled() const
Checks if the sizePrefixDisabled flag is on.
bool isTcpNoDelayEnabled() const
Checks if the tcpNoDelayEnabled flag is on.
void setTcpNoDelayEnabled(bool tcpNoDelayEnabled)
Sets if the tcpNoDelayEnabled flag is on.
bool isValid() const
Determines if we think this is a Valid WireFormatInfo command.
void setSizePrefixDisabled(bool sizePrefixDisabled)
Sets if the sizePrefixDisabled flag is on.
virtual void setProperties(const util::PrimitiveMap &map)
Sets the Properties for this Command.
Definition WireFormatInfo.h:241
virtual bool equals(const DataStructure *value) const
Compares the DataStructure passed in to this one, and returns if they are equivalent.
long long getMaxInactivityDurationInitalDelay() const
Returns the currently configured Max Inactivity Intial Delay duration.
bool isTightEncodingEnabled() const
Checks if the tightEncodingEnabled flag is on.
virtual bool isWireFormatInfo() const
Definition WireFormatInfo.h:254
int getCacheSize() const
Gets the Cache Size setting.
virtual bool isMarshalAware() const
Determine if the class implementing this interface is really wanting to be told about marshaling.
Definition WireFormatInfo.h:68
static const unsigned char ID_WIREFORMATINFO
Definition WireFormatInfo.h:50
void setCacheEnabled(bool cacheEnabled)
Sets if the cacheEnabled flag is on.
void setMaxInactivityDuration(long long maxInactivityDuration)
Sets the Max inactivity duration value.
virtual util::PrimitiveMap & getProperties()
Gets the Properties for this Command.
Definition WireFormatInfo.h:233
void setMarshalledProperties(const std::vector< unsigned char > &marshalledProperties)
Sets the value of the marshalledProperties field.
Definition WireFormatInfo.h:217
Interface for an Object that can visit the various Command Objects that are sent from and to this cli...
Definition CommandVisitor.h:69
Map of named primitives.
Definition PrimitiveMap.h:36
Provides a mechanism to marshal commands into and out of packets or into and out of streams,...
Definition WireFormat.h:43
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
virtual void copy(const StlMap &source)
Definition StlMap.h:690
Definition ActiveMQBlobMessage.h:28
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24