public class MQTTWireFormat extends Object implements WireFormat
Constructor and Description |
---|
MQTTWireFormat() |
Modifier and Type | Method and Description |
---|---|
long |
getConnectAttemptTimeout() |
int |
getMaxFrameSize() |
int |
getVersion() |
ByteSequence |
marshal(Object command)
Packet based marshaling
|
void |
marshal(Object command,
DataOutput dataOut)
Stream based marshaling
|
void |
setConnectAttemptTimeout(long connectTimeout)
Sets the timeout value used to fail a connection if no CONNECT frame is read
in the given interval.
|
void |
setMaxFrameSize(int maxFrameSize)
Sets the maximum frame size for an incoming MQTT frame.
|
void |
setVersion(int version) |
Object |
unmarshal(ByteSequence packet)
Packet based un-marshaling
|
Object |
unmarshal(DataInput dataIn)
Packet based un-marshaling
|
public MQTTWireFormat()
public ByteSequence marshal(Object command) throws IOException
WireFormat
marshal
in interface WireFormat
IOException
public Object unmarshal(ByteSequence packet) throws IOException
WireFormat
unmarshal
in interface WireFormat
IOException
public void marshal(Object command, DataOutput dataOut) throws IOException
WireFormat
marshal
in interface WireFormat
IOException
public Object unmarshal(DataInput dataIn) throws IOException
WireFormat
unmarshal
in interface WireFormat
IOException
public void setVersion(int version)
setVersion
in interface WireFormat
the
- version of the wire formatpublic int getVersion()
getVersion
in interface WireFormat
public int getMaxFrameSize()
public void setMaxFrameSize(int maxFrameSize)
maxFrameSize
- the maximum allowed frame size for a single MQTT frame.public long getConnectAttemptTimeout()
public void setConnectAttemptTimeout(long connectTimeout)
connectTimeout
- the connection frame received timeout value.Copyright © 2005–2018. All rights reserved.