org.apache.activemq.transport.mqtt
Class MQTTWireFormat

java.lang.Object
  extended by org.apache.activemq.transport.mqtt.MQTTWireFormat
All Implemented Interfaces:
WireFormat

public class MQTTWireFormat
extends Object
implements WireFormat

Implements marshalling and unmarsalling the MQTT protocol.


Constructor Summary
MQTTWireFormat()
           
 
Method Summary
 int getVersion()
           
 ByteSequence marshal(Object command)
          Packet based marshaling
 void marshal(Object command, DataOutput dataOut)
          Stream based marshaling
 void setVersion(int version)
           
 Object unmarshal(ByteSequence packet)
          Packet based un-marshaling
 Object unmarshal(DataInput dataIn)
          Packet based un-marshaling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MQTTWireFormat

public MQTTWireFormat()
Method Detail

marshal

public ByteSequence marshal(Object command)
                     throws IOException
Description copied from interface: WireFormat
Packet based marshaling

Specified by:
marshal in interface WireFormat
Throws:
IOException

unmarshal

public Object unmarshal(ByteSequence packet)
                 throws IOException
Description copied from interface: WireFormat
Packet based un-marshaling

Specified by:
unmarshal in interface WireFormat
Throws:
IOException

marshal

public void marshal(Object command,
                    DataOutput dataOut)
             throws IOException
Description copied from interface: WireFormat
Stream based marshaling

Specified by:
marshal in interface WireFormat
Throws:
IOException

unmarshal

public Object unmarshal(DataInput dataIn)
                 throws IOException
Description copied from interface: WireFormat
Packet based un-marshaling

Specified by:
unmarshal in interface WireFormat
Throws:
IOException

setVersion

public void setVersion(int version)
Specified by:
setVersion in interface WireFormat
Parameters:
the - version of the wire format

getVersion

public int getVersion()
Specified by:
getVersion in interface WireFormat
Returns:
the version of the wire format


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.