Package org.apache.activemq.openwire
Class OpenWireFormat
java.lang.Object
org.apache.activemq.openwire.OpenWireFormat
- All Implemented Interfaces:
WireFormat
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final long
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()
doUnmarshal
(DataInput dis) boolean
getFromUnmarshallCache
(short index) long
int
int
hashCode()
boolean
boolean
boolean
boolean
boolean
boolean
void
looseMarshalNestedObject
(DataStructure o, DataOutput dataOut) Packet based marshalingvoid
marshal
(Object o, DataOutput dataOut) Stream based marshalingprotected int
min
(int version1, int version2) protected long
min
(long version1, long version2) void
void
void
setCacheEnabled
(boolean cacheEnabled) void
setInUnmarshallCache
(short index, DataStructure o) void
setMaxFrameSize
(long maxFrameSize) void
setMaxFrameSizeEnabled
(boolean maxFrameSizeEnabled) Set whether the maxFrameSize check will be enabled.void
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 transportsvoid
tightMarshal2
(Object o, DataOutput ds, BooleanStream bs) Used by NIO or AIO transports; note that the size is not written as part of this method.int
void
toString()
Packet based un-marshalingunmarshal
(ByteSequence sequence) Packet based un-marshaling
-
Field Details
-
DEFAULT_STORE_VERSION
public static final int DEFAULT_STORE_VERSION- See Also:
-
DEFAULT_WIRE_VERSION
public static final int DEFAULT_WIRE_VERSION- See Also:
-
DEFAULT_LEGACY_VERSION
public static final int DEFAULT_LEGACY_VERSION- See Also:
-
DEFAULT_MAX_FRAME_SIZE
public static final long DEFAULT_MAX_FRAME_SIZE- See Also:
-
-
Constructor Details
-
OpenWireFormat
public OpenWireFormat() -
OpenWireFormat
public OpenWireFormat(int i)
-
-
Method Details
-
hashCode
public int hashCode() -
copy
-
equals
-
toString
-
getVersion
public int getVersion()- Specified by:
getVersion
in interfaceWireFormat
- Returns:
- the version of the wire format
-
marshal
Description copied from interface:WireFormat
Packet based marshaling- Specified by:
marshal
in interfaceWireFormat
- Throws:
IOException
-
unmarshal
Description copied from interface:WireFormat
Packet based un-marshaling- Specified by:
unmarshal
in interfaceWireFormat
- Throws:
IOException
-
marshal
Description copied from interface:WireFormat
Stream based marshaling- Specified by:
marshal
in interfaceWireFormat
- Throws:
IOException
-
unmarshal
Description copied from interface:WireFormat
Packet based un-marshaling- Specified by:
unmarshal
in interfaceWireFormat
- Throws:
IOException
-
tightMarshal1
Used by NIO or AIO transports- Throws:
IOException
-
tightMarshal2
Used by NIO or AIO transports; note that the size is not written as part of this method.- Throws:
IOException
-
setVersion
public void setVersion(int version) Allows you to dynamically switch the version of the openwire protocol being used.- Specified by:
setVersion
in interfaceWireFormat
- Parameters:
version
-
-
doUnmarshal
- Throws:
IOException
-
tightMarshalNestedObject1
- Throws:
IOException
-
tightMarshalNestedObject2
public void tightMarshalNestedObject2(DataStructure o, DataOutput ds, BooleanStream bs) throws IOException - Throws:
IOException
-
tightUnmarshalNestedObject
- Throws:
IOException
-
looseUnmarshalNestedObject
- Throws:
IOException
-
looseMarshalNestedObject
- Throws:
IOException
-
runMarshallCacheEvictionSweep
public void runMarshallCacheEvictionSweep() -
getMarshallCacheIndex
-
addToMarshallCache
-
setInUnmarshallCache
-
getFromUnmarshallCache
-
setStackTraceEnabled
public void setStackTraceEnabled(boolean b) -
isStackTraceEnabled
public boolean isStackTraceEnabled() -
isTcpNoDelayEnabled
public boolean isTcpNoDelayEnabled() -
setTcpNoDelayEnabled
public void setTcpNoDelayEnabled(boolean tcpNoDelayEnabled) -
isCacheEnabled
public boolean isCacheEnabled() -
setCacheEnabled
public void setCacheEnabled(boolean cacheEnabled) -
isTightEncodingEnabled
public boolean isTightEncodingEnabled() -
setTightEncodingEnabled
public void setTightEncodingEnabled(boolean tightEncodingEnabled) -
isSizePrefixDisabled
public boolean isSizePrefixDisabled() -
setSizePrefixDisabled
public void setSizePrefixDisabled(boolean prefixPacketSize) -
setPreferedWireFormatInfo
-
getPreferedWireFormatInfo
-
getMaxFrameSize
public long getMaxFrameSize() -
setMaxFrameSize
public void setMaxFrameSize(long maxFrameSize) -
isMaxFrameSizeEnabled
public boolean isMaxFrameSizeEnabled() -
setMaxFrameSizeEnabled
public void setMaxFrameSizeEnabled(boolean maxFrameSizeEnabled) Set whether the maxFrameSize check will be enabled. Note this is only applied to this format and will NOT be negotiated- Parameters:
maxFrameSizeEnabled
-
-
renegotiateWireFormat
- Throws:
IOException
-
min
protected int min(int version1, int version2) -
min
protected long min(long version1, long version2)
-