public class StompWireFormat extends Object implements WireFormat
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_CONNECTION_TIMEOUT |
static long |
DEFAULT_MAX_FRAME_SIZE |
static int |
MAX_DATA_LENGTH |
Constructor and Description |
---|
StompWireFormat() |
Modifier and Type | Method and Description |
---|---|
long |
getConnectionAttemptTimeout() |
int |
getMaxDataLength() |
long |
getMaxFrameSize() |
String |
getStompVersion() |
int |
getVersion() |
ByteSequence |
marshal(Object command)
Packet based marshaling
|
void |
marshal(Object command,
DataOutput os)
Stream based marshaling
|
protected String |
parseAction(DataInput in,
AtomicLong frameSize) |
protected int |
parseContentLength(String contentLength,
AtomicLong frameSize) |
protected HashMap<String,String> |
parseHeaders(DataInput in,
AtomicLong frameSize) |
void |
setConnectionAttemptTimeout(long connectionAttemptTimeout) |
void |
setMaxDataLength(int maxDataLength) |
void |
setMaxFrameSize(long maxFrameSize) |
void |
setStompVersion(String stompVersion) |
void |
setVersion(int version) |
Object |
unmarshal(ByteSequence packet)
Packet based un-marshaling
|
Object |
unmarshal(DataInput in)
Packet based un-marshaling
|
public static final int MAX_DATA_LENGTH
public static final long DEFAULT_MAX_FRAME_SIZE
public static final long DEFAULT_CONNECTION_TIMEOUT
public StompWireFormat()
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 os) throws IOException
WireFormat
marshal
in interface WireFormat
IOException
public Object unmarshal(DataInput in) throws IOException
WireFormat
unmarshal
in interface WireFormat
IOException
protected String parseAction(DataInput in, AtomicLong frameSize) throws IOException
IOException
protected HashMap<String,String> parseHeaders(DataInput in, AtomicLong frameSize) throws IOException
IOException
protected int parseContentLength(String contentLength, AtomicLong frameSize) throws ProtocolException
ProtocolException
public int getVersion()
getVersion
in interface WireFormat
public void setVersion(int version)
setVersion
in interface WireFormat
public String getStompVersion()
public void setStompVersion(String stompVersion)
public void setMaxDataLength(int maxDataLength)
public int getMaxDataLength()
public long getMaxFrameSize()
public void setMaxFrameSize(long maxFrameSize)
public long getConnectionAttemptTimeout()
public void setConnectionAttemptTimeout(long connectionAttemptTimeout)
Copyright © 2005–2018 The Apache Software Foundation. All rights reserved.