Package org.apache.activemq.command
Class WireFormatInfo
- java.lang.Object
-
- org.apache.activemq.command.WireFormatInfo
-
- All Implemented Interfaces:
Command
,DataStructure
,MarshallAware
public class WireFormatInfo extends Object implements Command, MarshallAware
-
-
Field Summary
Fields Modifier and Type Field Description static byte
DATA_STRUCTURE_TYPE
protected byte[]
magic
protected ByteSequence
marshalledProperties
protected Map<String,Object>
properties
protected int
version
-
Constructor Summary
Constructors Constructor Description WireFormatInfo()
-
Method Summary
-
-
-
Field Detail
-
DATA_STRUCTURE_TYPE
public static final byte DATA_STRUCTURE_TYPE
- See Also:
- Constant Field Values
-
magic
protected byte[] magic
-
version
protected int version
-
marshalledProperties
protected ByteSequence marshalledProperties
-
-
Method Detail
-
getDataStructureType
public byte getDataStructureType()
- Specified by:
getDataStructureType
in interfaceDataStructure
- Returns:
- The type of the data structure
-
isWireFormatInfo
public boolean isWireFormatInfo()
- Specified by:
isWireFormatInfo
in interfaceCommand
-
isMarshallAware
public boolean isMarshallAware()
- Specified by:
isMarshallAware
in interfaceDataStructure
-
getMagic
public byte[] getMagic()
-
setMagic
public void setMagic(byte[] magic)
-
getVersion
public int getVersion()
-
setVersion
public void setVersion(int version)
-
getMarshalledProperties
public ByteSequence getMarshalledProperties()
-
setMarshalledProperties
public void setMarshalledProperties(ByteSequence marshalledProperties)
-
getFrom
public Endpoint getFrom()
The endpoint within the transport where this message came from.
-
getTo
public Endpoint getTo()
The endpoint within the transport where this message is going to - null means all endpoints.
-
getProperty
public Object getProperty(String name) throws IOException
- Throws:
IOException
-
getProperties
public Map<String,Object> getProperties() throws IOException
- Throws:
IOException
-
clearProperties
public void clearProperties()
-
setProperty
public void setProperty(String name, Object value) throws IOException
- Throws:
IOException
-
lazyCreateProperties
protected void lazyCreateProperties() throws IOException
- Throws:
IOException
-
beforeMarshall
public void beforeMarshall(WireFormat wireFormat) throws IOException
- Specified by:
beforeMarshall
in interfaceMarshallAware
- Throws:
IOException
-
afterMarshall
public void afterMarshall(WireFormat wireFormat) throws IOException
- Specified by:
afterMarshall
in interfaceMarshallAware
- Throws:
IOException
-
beforeUnmarshall
public void beforeUnmarshall(WireFormat wireFormat) throws IOException
- Specified by:
beforeUnmarshall
in interfaceMarshallAware
- Throws:
IOException
-
afterUnmarshall
public void afterUnmarshall(WireFormat wireFormat) throws IOException
- Specified by:
afterUnmarshall
in interfaceMarshallAware
- Throws:
IOException
-
isValid
public boolean isValid()
-
setResponseRequired
public void setResponseRequired(boolean responseRequired)
- Specified by:
setResponseRequired
in interfaceCommand
-
isCacheEnabled
public boolean isCacheEnabled() throws IOException
- Throws:
IOException
-
setCacheEnabled
public void setCacheEnabled(boolean cacheEnabled) throws IOException
- Throws:
IOException
-
isStackTraceEnabled
public boolean isStackTraceEnabled() throws IOException
- Throws:
IOException
-
setStackTraceEnabled
public void setStackTraceEnabled(boolean stackTraceEnabled) throws IOException
- Throws:
IOException
-
isTcpNoDelayEnabled
public boolean isTcpNoDelayEnabled() throws IOException
- Throws:
IOException
-
setTcpNoDelayEnabled
public void setTcpNoDelayEnabled(boolean tcpNoDelayEnabled) throws IOException
- Throws:
IOException
-
isSizePrefixDisabled
public boolean isSizePrefixDisabled() throws IOException
- Throws:
IOException
-
setSizePrefixDisabled
public void setSizePrefixDisabled(boolean prefixPacketSize) throws IOException
- Throws:
IOException
-
isTightEncodingEnabled
public boolean isTightEncodingEnabled() throws IOException
- Throws:
IOException
-
setTightEncodingEnabled
public void setTightEncodingEnabled(boolean tightEncodingEnabled) throws IOException
- Throws:
IOException
-
getHost
public String getHost() throws IOException
- Throws:
IOException
-
setHost
public void setHost(String hostname) throws IOException
- Throws:
IOException
-
getMaxInactivityDuration
public long getMaxInactivityDuration() throws IOException
- Throws:
IOException
-
setMaxInactivityDuration
public void setMaxInactivityDuration(long maxInactivityDuration) throws IOException
- Throws:
IOException
-
getMaxInactivityDurationInitalDelay
public long getMaxInactivityDurationInitalDelay() throws IOException
- Throws:
IOException
-
setMaxInactivityDurationInitalDelay
public void setMaxInactivityDurationInitalDelay(long maxInactivityDurationInitalDelay) throws IOException
- Throws:
IOException
-
getMaxFrameSize
public long getMaxFrameSize() throws IOException
- Throws:
IOException
-
setMaxFrameSize
public void setMaxFrameSize(long maxFrameSize) throws IOException
- Throws:
IOException
-
getCacheSize
public int getCacheSize() throws IOException
- Throws:
IOException
-
setCacheSize
public void setCacheSize(int cacheSize) throws IOException
- Throws:
IOException
-
getProviderName
public String getProviderName() throws IOException
- Throws:
IOException
-
setProviderName
public void setProviderName(String providerName) throws IOException
- Throws:
IOException
-
getProviderVersion
public String getProviderVersion() throws IOException
- Throws:
IOException
-
setProviderVersion
public void setProviderVersion(String providerVersion) throws IOException
- Throws:
IOException
-
getPlatformDetails
public String getPlatformDetails() throws IOException
- Throws:
IOException
-
setPlatformDetails
public void setPlatformDetails(String platformDetails) throws IOException
- Throws:
IOException
-
isMaxFrameSizeEnabled
public boolean isMaxFrameSizeEnabled() throws IOException
- Throws:
IOException
-
setMaxFrameSizeEnabled
public void setMaxFrameSizeEnabled(boolean maxFrameSizeEnabled) throws IOException
- Throws:
IOException
-
visit
public Response visit(CommandVisitor visitor) throws Exception
-
setCommandId
public void setCommandId(int value)
- Specified by:
setCommandId
in interfaceCommand
-
getCommandId
public int getCommandId()
- Specified by:
getCommandId
in interfaceCommand
- Returns:
- the unique ID of this request used to map responses to requests
-
isResponseRequired
public boolean isResponseRequired()
- Specified by:
isResponseRequired
in interfaceCommand
-
isResponse
public boolean isResponse()
- Specified by:
isResponse
in interfaceCommand
-
isBrokerInfo
public boolean isBrokerInfo()
- Specified by:
isBrokerInfo
in interfaceCommand
-
isMessageDispatch
public boolean isMessageDispatch()
- Specified by:
isMessageDispatch
in interfaceCommand
-
isMessageAck
public boolean isMessageAck()
- Specified by:
isMessageAck
in interfaceCommand
-
isMessageDispatchNotification
public boolean isMessageDispatchNotification()
- Specified by:
isMessageDispatchNotification
in interfaceCommand
-
isShutdownInfo
public boolean isShutdownInfo()
- Specified by:
isShutdownInfo
in interfaceCommand
-
isConnectionControl
public boolean isConnectionControl()
- Specified by:
isConnectionControl
in interfaceCommand
-
isConsumerControl
public boolean isConsumerControl()
- Specified by:
isConsumerControl
in interfaceCommand
-
setCachedMarshalledForm
public void setCachedMarshalledForm(WireFormat wireFormat, ByteSequence data)
-
getCachedMarshalledForm
public ByteSequence getCachedMarshalledForm(WireFormat wireFormat)
-
-