activemq-cpp-3.8.2
WireFormatInfo.h
Go to the documentation of this file.
1 
18 #ifndef _ACTIVEMQ_COMMANDS_WIREFORMATINFO_H_
19 #define _ACTIVEMQ_COMMANDS_WIREFORMATINFO_H_
20 
21 #include <activemq/util/Config.h>
25 
26 #include <vector>
27 
28 namespace activemq{
29 namespace 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 
60  virtual DataStructure* cloneDataStructure() const;
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 
107  long long getMaxInactivityDurationInitalDelay() const;
108 
113  void setMaxInactivityDurationInitalDelay( long long maxInactivityDurationInitalDelay );
114 
119  bool isStackTraceEnabled() const;
120 
125  void setStackTraceEnabled( bool stackTraceEnabled );
126 
131  bool isTcpNoDelayEnabled() const;
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 
167  bool isTightEncodingEnabled() const;
168 
173  void setTightEncodingEnabled( bool tightEncodingEnabled );
174 
179  bool isSizePrefixDisabled() const;
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
virtual const util::PrimitiveMap & getProperties() const
Gets the Properties for this Command.
Definition: WireFormatInfo.h:225
const std::vector< unsigned char > & getMagic() const
Get the Magic field.
Definition: WireFormatInfo.h:191
virtual bool isWireFormatInfo() const
Definition: WireFormatInfo.h:254
Definition: DataStructure.h:27
virtual void copy(const StlMap &source)
Definition: StlMap.h:698
Interface for an Object that can visit the various Command Objects that are sent from and to this cli...
Definition: CommandVisitor.h:69
virtual util::PrimitiveMap & getProperties()
Gets the Properties for this Command.
Definition: WireFormatInfo.h:233
Definition: BaseCommand.h:27
void setVersion(int version)
Set the current Wireformat Version.
Definition: WireFormatInfo.h:87
const std::vector< unsigned char > & getMarshalledProperties() const
Get the marshalledProperties field.
Definition: WireFormatInfo.h:207
Map of named primitives.
Definition: PrimitiveMap.h:36
Definition: WireFormatInfo.h:31
virtual bool isMarshalAware() const
Determine if the class implementing this interface is really wanting to be told about marshaling...
Definition: WireFormatInfo.h:68
int getVersion() const
Get the current Wireformat Version.
Definition: WireFormatInfo.h:79
Provides a mechanism to marshal commands into and out of packets or into and out of streams...
Definition: WireFormat.h:43
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: CachedConsumer.h:24
virtual void setProperties(const util::PrimitiveMap &map)
Sets the Properties for this Command.
Definition: WireFormatInfo.h:241
Decaf&#39;s implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: Pointer.h:53
void setMarshalledProperties(const std::vector< unsigned char > &marshalledProperties)
Sets the value of the marshalledProperties field.
Definition: WireFormatInfo.h:217
void setMagic(const std::vector< unsigned char > &magic)
Sets the value of the magic field.
Definition: WireFormatInfo.h:199