org.apache.activemq.command
Class BaseCommand

java.lang.Object
  extended by org.apache.activemq.command.BaseCommand
All Implemented Interfaces:
Command, DataStructure
Direct Known Subclasses:
BrokerInfo, ConnectionControl, ConnectionError, ConnectionInfo, ConsumerControl, ConsumerInfo, ControlCommand, DestinationInfo, FlushCommand, KeepAliveInfo, Message, MessageAck, MessageDispatch, MessageDispatchNotification, MessagePull, ProducerAck, ProducerInfo, RemoveInfo, RemoveSubscriptionInfo, ReplayCommand, Response, SessionInfo, ShutdownInfo, TransactionInfo

public abstract class BaseCommand
extends Object
implements Command


Field Summary
protected  int commandId
           
protected  boolean responseRequired
           
 
Constructor Summary
BaseCommand()
           
 
Method Summary
 void copy(BaseCommand copy)
           
 int getCommandId()
           
 Endpoint getFrom()
          The endpoint within the transport where this message came from.
 Endpoint getTo()
          The endpoint within the transport where this message is going to - null means all endpoints.
 boolean isBrokerInfo()
           
 boolean isConnectionControl()
           
 boolean isMarshallAware()
           
 boolean isMessage()
           
 boolean isMessageAck()
           
 boolean isMessageDispatch()
           
 boolean isMessageDispatchNotification()
           
 boolean isResponse()
           
 boolean isResponseRequired()
           
 boolean isShutdownInfo()
           
 boolean isWireFormatInfo()
           
 void setCommandId(int commandId)
           
 void setFrom(Endpoint from)
           
 void setResponseRequired(boolean responseRequired)
           
 void setTo(Endpoint to)
           
 String toString()
           
 String toString(Map<String,Object> overrideFields)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.activemq.command.Command
visit
 
Methods inherited from interface org.apache.activemq.command.DataStructure
getDataStructureType
 

Field Detail

commandId

protected int commandId

responseRequired

protected boolean responseRequired
Constructor Detail

BaseCommand

public BaseCommand()
Method Detail

copy

public void copy(BaseCommand copy)

getCommandId

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

setCommandId

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

isResponseRequired

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

setResponseRequired

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

toString

public String toString()
Overrides:
toString in class Object

toString

public String toString(Map<String,Object> overrideFields)

isWireFormatInfo

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

isBrokerInfo

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

isResponse

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

isMessageDispatch

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

isMessage

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

isMarshallAware

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

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

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


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