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
WireFormatmarshal in interface WireFormatIOExceptionpublic Object unmarshal(ByteSequence packet) throws IOException
WireFormatunmarshal in interface WireFormatIOExceptionpublic void marshal(Object command, DataOutput os) throws IOException
WireFormatmarshal in interface WireFormatIOExceptionpublic Object unmarshal(DataInput in) throws IOException
WireFormatunmarshal in interface WireFormatIOExceptionprotected String parseAction(DataInput in, AtomicLong frameSize) throws IOException
IOExceptionprotected HashMap<String,String> parseHeaders(DataInput in, AtomicLong frameSize) throws IOException
IOExceptionprotected int parseContentLength(String contentLength, AtomicLong frameSize) throws ProtocolException
ProtocolExceptionpublic int getVersion()
getVersion in interface WireFormatpublic void setVersion(int version)
setVersion in interface WireFormatpublic 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–2017 The Apache Software Foundation. All rights reserved.