activemq-cpp-3.6.0
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_*/