public final class OpenWireFormat extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_FRAME_SIZE |
static int |
DEFAULT_VERSION |
static String |
WIREFORMAT_NAME |
Constructor and Description |
---|
OpenWireFormat() |
OpenWireFormat(int i) |
Modifier and Type | Method and Description |
---|---|
Short |
addToMarshallCache(DataStructure o) |
OpenWireFormat |
copy() |
Object |
doUnmarshal(org.fusesource.hawtbuf.DataByteArrayInputStream dis) |
boolean |
equals(Object object) |
DataStructure |
getFromUnmarshallCache(short index) |
Short |
getMarshallCacheIndex(DataStructure o) |
long |
getMaxFrameSize() |
String |
getName() |
int |
getVersion() |
int |
hashCode() |
boolean |
isCacheEnabled() |
boolean |
isSizePrefixDisabled() |
boolean |
isStackTraceEnabled() |
boolean |
isTcpNoDelayEnabled() |
boolean |
isTightEncodingEnabled() |
void |
looseMarshalNestedObject(DataStructure o,
org.fusesource.hawtbuf.DataByteArrayOutputStream dataOut) |
DataStructure |
looseUnmarshalNestedObject(org.fusesource.hawtbuf.DataByteArrayInputStream dis) |
org.fusesource.hawtbuf.Buffer |
marshal(Object command) |
void |
marshal(Object o,
org.fusesource.hawtbuf.DataByteArrayOutputStream dataOut) |
protected int |
min(int version1,
int version2) |
protected long |
min(long version1,
long version2) |
void |
renegotiateWireFormat(WireFormatInfo info,
WireFormatInfo preferedWireFormatInfo) |
void |
runMarshallCacheEvictionSweep() |
void |
setCacheEnabled(boolean cacheEnabled) |
void |
setInUnmarshallCache(short index,
DataStructure o) |
void |
setMaxFrameSize(long maxFrameSize) |
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(Object o,
BooleanStream bs)
Used by NIO or AIO transports
|
void |
tightMarshal2(Object o,
org.fusesource.hawtbuf.DataByteArrayOutputStream 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,
org.fusesource.hawtbuf.DataByteArrayOutputStream ds,
BooleanStream bs) |
DataStructure |
tightUnmarshalNestedObject(org.fusesource.hawtbuf.DataByteArrayInputStream dis,
BooleanStream bs) |
String |
toString() |
Object |
unmarshal(org.fusesource.hawtbuf.Buffer sequence) |
Object |
unmarshal(org.fusesource.hawtbuf.DataByteArrayInputStream dis) |
Object |
unmarshal(ReadableByteChannel channel) |
public static final int DEFAULT_VERSION
public static final String WIREFORMAT_NAME
public static final int DEFAULT_MAX_FRAME_SIZE
public OpenWireFormat()
public OpenWireFormat(int i)
public OpenWireFormat copy()
public int getVersion()
public String getName()
public org.fusesource.hawtbuf.Buffer marshal(Object command) throws IOException
IOException
public Object unmarshal(org.fusesource.hawtbuf.Buffer sequence) throws IOException
IOException
public void marshal(Object o, org.fusesource.hawtbuf.DataByteArrayOutputStream dataOut) throws IOException
IOException
public Object unmarshal(org.fusesource.hawtbuf.DataByteArrayInputStream dis) throws IOException
IOException
public Object unmarshal(ReadableByteChannel channel)
public int tightMarshal1(Object o, BooleanStream bs) throws IOException
IOException
public void tightMarshal2(Object o, org.fusesource.hawtbuf.DataByteArrayOutputStream ds, BooleanStream bs) throws IOException
IOException
public void setVersion(int version)
version
- public Object doUnmarshal(org.fusesource.hawtbuf.DataByteArrayInputStream dis) throws IOException
IOException
public int tightMarshalNestedObject1(DataStructure o, BooleanStream bs) throws IOException
IOException
public void tightMarshalNestedObject2(DataStructure o, org.fusesource.hawtbuf.DataByteArrayOutputStream ds, BooleanStream bs) throws IOException
IOException
public DataStructure tightUnmarshalNestedObject(org.fusesource.hawtbuf.DataByteArrayInputStream dis, BooleanStream bs) throws IOException
IOException
public DataStructure looseUnmarshalNestedObject(org.fusesource.hawtbuf.DataByteArrayInputStream dis) throws IOException
IOException
public void looseMarshalNestedObject(DataStructure o, org.fusesource.hawtbuf.DataByteArrayOutputStream dataOut) throws IOException
IOException
public void runMarshallCacheEvictionSweep()
public Short getMarshallCacheIndex(DataStructure o)
public 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 long getMaxFrameSize()
public void setMaxFrameSize(long maxFrameSize)
public void renegotiateWireFormat(WireFormatInfo info, WireFormatInfo preferedWireFormatInfo) throws IOException
IOException
protected int min(int version1, int version2)
protected long min(long version1, long version2)
Copyright © 2011–2014 Red Hat. All rights reserved.