org.apache.activemq.openwire
public final class OpenWireFormat extends java.lang.Object implements WireFormat
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_FRAME_SIZE |
static int |
DEFAULT_VERSION |
static int |
DEFAULT_WIRE_VERSION |
Constructor and Description |
---|
OpenWireFormat() |
OpenWireFormat(int i) |
Modifier and Type | Method and Description |
---|---|
java.lang.Short |
addToMarshallCache(DataStructure o) |
OpenWireFormat |
copy() |
java.lang.Object |
doUnmarshal(java.io.DataInput dis) |
boolean |
equals(java.lang.Object object) |
DataStructure |
getFromUnmarshallCache(short index) |
java.lang.Short |
getMarshallCacheIndex(DataStructure o) |
long |
getMaxFrameSize() |
WireFormatInfo |
getPreferedWireFormatInfo() |
int |
getVersion() |
int |
hashCode() |
boolean |
isCacheEnabled() |
boolean |
isSizePrefixDisabled() |
boolean |
isStackTraceEnabled() |
boolean |
isTcpNoDelayEnabled() |
boolean |
isTightEncodingEnabled() |
void |
looseMarshalNestedObject(DataStructure o,
java.io.DataOutput dataOut) |
DataStructure |
looseUnmarshalNestedObject(java.io.DataInput dis) |
ByteSequence |
marshal(java.lang.Object command)
Packet based marshaling
|
void |
marshal(java.lang.Object o,
java.io.DataOutput dataOut)
Stream based marshaling
|
protected int |
min(int version1,
int version2) |
protected long |
min(long version1,
long version2) |
void |
renegotiateWireFormat(WireFormatInfo info) |
void |
runMarshallCacheEvictionSweep() |
void |
setCacheEnabled(boolean cacheEnabled) |
void |
setInUnmarshallCache(short index,
DataStructure o) |
void |
setMaxFrameSize(long maxFrameSize) |
void |
setPreferedWireFormatInfo(WireFormatInfo info) |
void |
setSizePrefixDisabled(boolean prefixPacketSize) |
void |
setStackTraceEnabled(boolean b) |
void |
setTcpNoDelayEnabled(boolean tcpNoDelayEnabled) |
void |
setTightEncodingEnabled(boolean tightEncodingEnabled) |
void |
setVersion(int version)
Allows you to dynamically switch the version of the openwire protocol
being used.
|
int |
tightMarshal1(java.lang.Object o,
BooleanStream bs)
Used by NIO or AIO transports
|
void |
tightMarshal2(java.lang.Object o,
java.io.DataOutput ds,
BooleanStream bs)
Used by NIO or AIO transports; note that the size is not written as part
of this method.
|
int |
tightMarshalNestedObject1(DataStructure o,
BooleanStream bs) |
void |
tightMarshalNestedObject2(DataStructure o,
java.io.DataOutput ds,
BooleanStream bs) |
DataStructure |
tightUnmarshalNestedObject(java.io.DataInput dis,
BooleanStream bs) |
java.lang.String |
toString() |
java.lang.Object |
unmarshal(ByteSequence sequence)
Packet based un-marshaling
|
java.lang.Object |
unmarshal(java.io.DataInput dis)
Packet based un-marshaling
|
public static final int DEFAULT_VERSION
public static final int DEFAULT_WIRE_VERSION
public static final int DEFAULT_MAX_FRAME_SIZE
public OpenWireFormat()
public OpenWireFormat(int i)
public int hashCode()
hashCode
in class java.lang.Object
public OpenWireFormat copy()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int getVersion()
getVersion
in interface WireFormat
public ByteSequence marshal(java.lang.Object command) throws java.io.IOException
WireFormat
marshal
in interface WireFormat
java.io.IOException
public java.lang.Object unmarshal(ByteSequence sequence) throws java.io.IOException
WireFormat
unmarshal
in interface WireFormat
java.io.IOException
public void marshal(java.lang.Object o, java.io.DataOutput dataOut) throws java.io.IOException
WireFormat
marshal
in interface WireFormat
java.io.IOException
public java.lang.Object unmarshal(java.io.DataInput dis) throws java.io.IOException
WireFormat
unmarshal
in interface WireFormat
java.io.IOException
public int tightMarshal1(java.lang.Object o, BooleanStream bs) throws java.io.IOException
java.io.IOException
public void tightMarshal2(java.lang.Object o, java.io.DataOutput ds, BooleanStream bs) throws java.io.IOException
java.io.IOException
public void setVersion(int version)
setVersion
in interface WireFormat
version
- public java.lang.Object doUnmarshal(java.io.DataInput dis) throws java.io.IOException
java.io.IOException
public int tightMarshalNestedObject1(DataStructure o, BooleanStream bs) throws java.io.IOException
java.io.IOException
public void tightMarshalNestedObject2(DataStructure o, java.io.DataOutput ds, BooleanStream bs) throws java.io.IOException
java.io.IOException
public DataStructure tightUnmarshalNestedObject(java.io.DataInput dis, BooleanStream bs) throws java.io.IOException
java.io.IOException
public DataStructure looseUnmarshalNestedObject(java.io.DataInput dis) throws java.io.IOException
java.io.IOException
public void looseMarshalNestedObject(DataStructure o, java.io.DataOutput dataOut) throws java.io.IOException
java.io.IOException
public void runMarshallCacheEvictionSweep()
public java.lang.Short getMarshallCacheIndex(DataStructure o)
public java.lang.Short addToMarshallCache(DataStructure o)
public void setInUnmarshallCache(short index, DataStructure o)
public DataStructure getFromUnmarshallCache(short index)
public void setStackTraceEnabled(boolean b)
public boolean isStackTraceEnabled()
public boolean isTcpNoDelayEnabled()
public void setTcpNoDelayEnabled(boolean tcpNoDelayEnabled)
public boolean isCacheEnabled()
public void setCacheEnabled(boolean cacheEnabled)
public boolean isTightEncodingEnabled()
public void setTightEncodingEnabled(boolean tightEncodingEnabled)
public boolean isSizePrefixDisabled()
public void setSizePrefixDisabled(boolean prefixPacketSize)
public void setPreferedWireFormatInfo(WireFormatInfo info)
public WireFormatInfo getPreferedWireFormatInfo()
public long getMaxFrameSize()
public void setMaxFrameSize(long maxFrameSize)
public void renegotiateWireFormat(WireFormatInfo info) throws java.io.IOException
java.io.IOException
protected int min(int version1, int version2)
protected long min(long version1, long version2)
Copyright © 2005-2014. All Rights Reserved.