00001 00018 #ifndef _ACTIVEMQ_WIREFORMAT_WIREFORMAT_H_ 00019 #define _ACTIVEMQ_WIREFORMAT_WIREFORMAT_H_ 00020 00021 #include <activemq/wireformat/WireFormatNegotiator.h> 00022 00023 #include <decaf/io/DataInputStream.h> 00024 #include <decaf/io/DataOutputStream.h> 00025 #include <decaf/io/IOException.h> 00026 #include <decaf/lang/Pointer.h> 00027 00028 #include <activemq/util/Config.h> 00029 #include <activemq/commands/Command.h> 00030 #include <activemq/transport/Transport.h> 00031 00032 #include <decaf/lang/exceptions/UnsupportedOperationException.h> 00033 00034 namespace activemq { 00035 namespace wireformat { 00036 00037 using decaf::lang::Pointer; 00038 00043 class AMQCPP_API WireFormat { 00044 public: 00045 00046 virtual ~WireFormat(); 00047 00061 virtual void marshal(const Pointer<commands::Command> command, 00062 const activemq::transport::Transport* transport, 00063 decaf::io::DataOutputStream* out) = 0; 00064 00079 virtual Pointer<commands::Command> unmarshal(const activemq::transport::Transport* transport, 00080 decaf::io::DataInputStream* in) = 0; 00081 00088 virtual void setVersion(int version) = 0; 00089 00095 virtual int getVersion() const = 0; 00096 00102 virtual bool hasNegotiator() const = 0; 00103 00113 virtual bool inReceive() const = 0; 00114 00126 virtual Pointer<transport::Transport> createNegotiator( 00127 const Pointer<transport::Transport> transport) = 0; 00128 00129 }; 00130 00131 }} 00132 00133 #endif /*_ACTIVEMQ_WIREFORMAT_WIREFORMAT_H_*/
1.6.1