public final class OpenWireFormat
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_FRAME_SIZE |
static int |
DEFAULT_VERSION |
static java.lang.String |
WIREFORMAT_NAME |
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(org.fusesource.hawtbuf.DataByteArrayInputStream dis) |
boolean |
equals(java.lang.Object object) |
DataStructure |
getFromUnmarshallCache(short index) |
java.lang.Short |
getMarshallCacheIndex(DataStructure o) |
long |
getMaxFrameSize() |
java.lang.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(java.lang.Object command) |
void |
marshal(java.lang.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(java.lang.Object o,
BooleanStream bs)
Used by NIO or AIO transports
|
void |
tightMarshal2(java.lang.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) |
java.lang.String |
toString() |
java.lang.Object |
unmarshal(org.fusesource.hawtbuf.Buffer sequence) |
java.lang.Object |
unmarshal(org.fusesource.hawtbuf.DataByteArrayInputStream dis) |
java.lang.Object |
unmarshal(java.nio.channels.ReadableByteChannel channel) |
public static final int DEFAULT_VERSION
public static final java.lang.String WIREFORMAT_NAME
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()
public java.lang.String getName()
public org.fusesource.hawtbuf.Buffer marshal(java.lang.Object command) throws java.io.IOException
java.io.IOException
public java.lang.Object unmarshal(org.fusesource.hawtbuf.Buffer sequence) throws java.io.IOException
java.io.IOException
public void marshal(java.lang.Object o, org.fusesource.hawtbuf.DataByteArrayOutputStream dataOut) throws java.io.IOException
java.io.IOException
public java.lang.Object unmarshal(org.fusesource.hawtbuf.DataByteArrayInputStream dis) throws java.io.IOException
java.io.IOException
public java.lang.Object unmarshal(java.nio.channels.ReadableByteChannel channel)
public int tightMarshal1(java.lang.Object o, BooleanStream bs) throws java.io.IOException
java.io.IOException
public void tightMarshal2(java.lang.Object o, org.fusesource.hawtbuf.DataByteArrayOutputStream ds, BooleanStream bs) throws java.io.IOException
java.io.IOException
public void setVersion(int version)
version
- public java.lang.Object doUnmarshal(org.fusesource.hawtbuf.DataByteArrayInputStream 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, org.fusesource.hawtbuf.DataByteArrayOutputStream ds, BooleanStream bs) throws java.io.IOException
java.io.IOException
public DataStructure tightUnmarshalNestedObject(org.fusesource.hawtbuf.DataByteArrayInputStream dis, BooleanStream bs) throws java.io.IOException
java.io.IOException
public DataStructure looseUnmarshalNestedObject(org.fusesource.hawtbuf.DataByteArrayInputStream dis) throws java.io.IOException
java.io.IOException
public void looseMarshalNestedObject(DataStructure o, org.fusesource.hawtbuf.DataByteArrayOutputStream 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 long getMaxFrameSize()
public void setMaxFrameSize(long maxFrameSize)
public void renegotiateWireFormat(WireFormatInfo info, WireFormatInfo preferedWireFormatInfo) throws java.io.IOException
java.io.IOException
protected int min(int version1, int version2)
protected long min(long version1, long version2)
Copyright © 2011-2014 Red Hat. All Rights Reserved.