org.apache.activemq.command
Class WireFormatInfo

java.lang.Object
  extended by org.apache.activemq.command.WireFormatInfo
All Implemented Interfaces:
Command, DataStructure, MarshallAware

public class WireFormatInfo
extends Object
implements Command, MarshallAware


Field Summary
static byte DATA_STRUCTURE_TYPE
           
protected  byte[] magic
           
protected  ByteSequence marshalledProperties
           
protected  Map<String,Object> properties
           
protected  int version
           
 
Constructor Summary
WireFormatInfo()
           
 
Method Summary
 void afterMarshall(WireFormat wireFormat)
           
 void afterUnmarshall(WireFormat wireFormat)
           
 void beforeMarshall(WireFormat wireFormat)
           
 void beforeUnmarshall(WireFormat wireFormat)
           
 void clearProperties()
           
 ByteSequence getCachedMarshalledForm(WireFormat wireFormat)
           
 int getCacheSize()
           
 int getCommandId()
           
 byte getDataStructureType()
           
 Endpoint getFrom()
          The endpoint within the transport where this message came from.
 byte[] getMagic()
           
 ByteSequence getMarshalledProperties()
           
 long getMaxFrameSize()
           
 long getMaxInactivityDuration()
           
 long getMaxInactivityDurationInitalDelay()
           
 Map<String,Object> getProperties()
           
 Object getProperty(String name)
           
 Endpoint getTo()
          The endpoint within the transport where this message is going to - null means all endpoints.
 int getVersion()
           
 boolean isBrokerInfo()
           
 boolean isCacheEnabled()
           
 boolean isConnectionControl()
           
 boolean isMarshallAware()
           
 boolean isMessage()
           
 boolean isMessageAck()
           
 boolean isMessageDispatch()
           
 boolean isMessageDispatchNotification()
           
 boolean isResponse()
           
 boolean isResponseRequired()
           
 boolean isShutdownInfo()
           
 boolean isSizePrefixDisabled()
           
 boolean isStackTraceEnabled()
           
 boolean isTcpNoDelayEnabled()
           
 boolean isTightEncodingEnabled()
           
 boolean isValid()
           
 boolean isWireFormatInfo()
           
protected  void lazyCreateProperties()
           
 void setCachedMarshalledForm(WireFormat wireFormat, ByteSequence data)
           
 void setCacheEnabled(boolean cacheEnabled)
           
 void setCacheSize(int cacheSize)
           
 void setCommandId(int value)
           
 void setFrom(Endpoint from)
           
 void setMagic(byte[] magic)
           
 void setMarshalledProperties(ByteSequence marshalledProperties)
           
 void setMaxFrameSize(long maxFrameSize)
           
 void setMaxInactivityDuration(long maxInactivityDuration)
           
 void setMaxInactivityDurationInitalDelay(long maxInactivityDurationInitalDelay)
           
 void setProperty(String name, Object value)
           
 void setResponseRequired(boolean responseRequired)
           
 void setSizePrefixDisabled(boolean prefixPacketSize)
           
 void setStackTraceEnabled(boolean stackTraceEnabled)
           
 void setTcpNoDelayEnabled(boolean tcpNoDelayEnabled)
           
 void setTightEncodingEnabled(boolean tightEncodingEnabled)
           
 void setTo(Endpoint to)
           
 void setVersion(int version)
           
 String toString()
           
 Response visit(CommandVisitor visitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

properties

protected transient Map<String,Object> properties
Constructor Detail

WireFormatInfo

public WireFormatInfo()
Method Detail

getDataStructureType

public byte getDataStructureType()
Specified by:
getDataStructureType in interface DataStructure
Returns:
The type of the data structure

isWireFormatInfo

public boolean isWireFormatInfo()
Specified by:
isWireFormatInfo in interface Command

isMarshallAware

public boolean isMarshallAware()
Specified by:
isMarshallAware in interface DataStructure

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.

Specified by:
getFrom in interface Command

setFrom

public void setFrom(Endpoint from)
Specified by:
setFrom in interface Command

getTo

public Endpoint getTo()
The endpoint within the transport where this message is going to - null means all endpoints.

Specified by:
getTo in interface Command

setTo

public void setTo(Endpoint to)
Specified by:
setTo in interface Command

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 interface MarshallAware
Throws:
IOException

afterMarshall

public void afterMarshall(WireFormat wireFormat)
                   throws IOException
Specified by:
afterMarshall in interface MarshallAware
Throws:
IOException

beforeUnmarshall

public void beforeUnmarshall(WireFormat wireFormat)
                      throws IOException
Specified by:
beforeUnmarshall in interface MarshallAware
Throws:
IOException

afterUnmarshall

public void afterUnmarshall(WireFormat wireFormat)
                     throws IOException
Specified by:
afterUnmarshall in interface MarshallAware
Throws:
IOException

isValid

public boolean isValid()

setResponseRequired

public void setResponseRequired(boolean responseRequired)
Specified by:
setResponseRequired in interface Command

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

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

visit

public Response visit(CommandVisitor visitor)
               throws Exception
Specified by:
visit in interface Command
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Object

setCommandId

public void setCommandId(int value)
Specified by:
setCommandId in interface Command

getCommandId

public int getCommandId()
Specified by:
getCommandId in interface Command
Returns:
the unique ID of this request used to map responses to requests

isResponseRequired

public boolean isResponseRequired()
Specified by:
isResponseRequired in interface Command

isResponse

public boolean isResponse()
Specified by:
isResponse in interface Command

isBrokerInfo

public boolean isBrokerInfo()
Specified by:
isBrokerInfo in interface Command

isMessageDispatch

public boolean isMessageDispatch()
Specified by:
isMessageDispatch in interface Command

isMessage

public boolean isMessage()
Specified by:
isMessage in interface Command

isMessageAck

public boolean isMessageAck()
Specified by:
isMessageAck in interface Command

isMessageDispatchNotification

public boolean isMessageDispatchNotification()
Specified by:
isMessageDispatchNotification in interface Command

isShutdownInfo

public boolean isShutdownInfo()
Specified by:
isShutdownInfo in interface Command

isConnectionControl

public boolean isConnectionControl()
Specified by:
isConnectionControl in interface Command

setCachedMarshalledForm

public void setCachedMarshalledForm(WireFormat wireFormat,
                                    ByteSequence data)

getCachedMarshalledForm

public ByteSequence getCachedMarshalledForm(WireFormat wireFormat)


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.