Package org.apache.activemq.command
Class ConnectionInfo
- java.lang.Object
-
- org.apache.activemq.command.BaseCommand
-
- org.apache.activemq.command.ConnectionInfo
-
- All Implemented Interfaces:
Command,DataStructure
public class ConnectionInfo extends BaseCommand
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanbrokerMasterConnectorprotected BrokerId[]brokerPathprotected StringclientIdprotected StringclientIpprotected booleanclientMasterprotected ConnectionIdconnectionIdstatic byteDATA_STRUCTURE_TYPEprotected booleanfailoverReconnectprotected booleanfaultTolerantprotected booleanmanageableprotected Stringpasswordprotected ObjecttransportContextprotected StringuserName-
Fields inherited from class org.apache.activemq.command.BaseCommand
commandId, responseRequired
-
-
Constructor Summary
Constructors Constructor Description ConnectionInfo()ConnectionInfo(ConnectionId connectionId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionInfocopy()RemoveInfocreateRemoveCommand()BrokerId[]getBrokerPath()The route of brokers the command has moved through.StringgetClientId()StringgetClientIp()ConnectionIdgetConnectionId()bytegetDataStructureType()StringgetPassword()ObjectgetTransportContext()Transports may wish to associate additional data with the connection.StringgetUserName()booleanisBrokerMasterConnector()booleanisClientMaster()booleanisFailoverReconnect()booleanisFaultTolerant()booleanisManageable()voidsetBrokerMasterConnector(boolean slaveBroker)voidsetBrokerPath(BrokerId[] brokerPath)voidsetClientId(String clientId)voidsetClientIp(String clientIp)voidsetClientMaster(boolean clientMaster)voidsetConnectionId(ConnectionId connectionId)voidsetFailoverReconnect(boolean failoverReconnect)voidsetFaultTolerant(boolean faultTolerant)voidsetManageable(boolean manageable)voidsetPassword(String password)voidsetTransportContext(Object transportContext)Transports may wish to associate additional data with the connection.voidsetUserName(String userName)Responsevisit(CommandVisitor visitor)-
Methods inherited from class org.apache.activemq.command.BaseCommand
copy, getCommandId, getFrom, getTo, isBrokerInfo, isConnectionControl, isConsumerControl, isMarshallAware, isMessage, isMessageAck, isMessageDispatch, isMessageDispatchNotification, isResponse, isResponseRequired, isShutdownInfo, isWireFormatInfo, setCommandId, setFrom, setResponseRequired, setTo, toString, toString
-
-
-
-
Field Detail
-
DATA_STRUCTURE_TYPE
public static final byte DATA_STRUCTURE_TYPE
- See Also:
- Constant Field Values
-
connectionId
protected ConnectionId connectionId
-
clientId
protected String clientId
-
clientIp
protected String clientIp
-
userName
protected String userName
-
password
protected String password
-
brokerPath
protected BrokerId[] brokerPath
-
brokerMasterConnector
protected boolean brokerMasterConnector
-
manageable
protected boolean manageable
-
clientMaster
protected boolean clientMaster
-
faultTolerant
protected boolean faultTolerant
-
failoverReconnect
protected boolean failoverReconnect
-
transportContext
protected transient Object transportContext
-
-
Constructor Detail
-
ConnectionInfo
public ConnectionInfo()
-
ConnectionInfo
public ConnectionInfo(ConnectionId connectionId)
-
-
Method Detail
-
getDataStructureType
public byte getDataStructureType()
- Returns:
- The type of the data structure
-
copy
public ConnectionInfo copy()
-
getConnectionId
public ConnectionId getConnectionId()
-
setConnectionId
public void setConnectionId(ConnectionId connectionId)
-
getClientId
public String getClientId()
-
setClientId
public void setClientId(String clientId)
-
createRemoveCommand
public RemoveInfo createRemoveCommand()
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
-
getUserName
public String getUserName()
-
setUserName
public void setUserName(String userName)
-
getBrokerPath
public BrokerId[] getBrokerPath()
The route of brokers the command has moved through.
-
setBrokerPath
public void setBrokerPath(BrokerId[] brokerPath)
-
visit
public Response visit(CommandVisitor visitor) throws Exception
- Throws:
Exception
-
isBrokerMasterConnector
public boolean isBrokerMasterConnector()
-
setBrokerMasterConnector
public void setBrokerMasterConnector(boolean slaveBroker)
- Parameters:
slaveBroker- The brokerMasterConnector to set.
-
isManageable
public boolean isManageable()
-
setManageable
public void setManageable(boolean manageable)
- Parameters:
manageable- The manageable to set.
-
getTransportContext
public Object getTransportContext()
Transports may wish to associate additional data with the connection. For example, an SSL transport may use this field to attach the client certificates used when the connection was established.- Returns:
- the transport context.
-
setTransportContext
public void setTransportContext(Object transportContext)
Transports may wish to associate additional data with the connection. For example, an SSL transport may use this field to attach the client certificates used when the connection was established.- Parameters:
transportContext- value used to set the transport context
-
isClientMaster
public boolean isClientMaster()
- Returns:
- the clientMaster
-
setClientMaster
public void setClientMaster(boolean clientMaster)
- Parameters:
clientMaster- the clientMaster to set
-
isFaultTolerant
public boolean isFaultTolerant()
- Returns:
- the faultTolerant
-
setFaultTolerant
public void setFaultTolerant(boolean faultTolerant)
- Parameters:
faultTolerant- the faultTolerant to set
-
isFailoverReconnect
public boolean isFailoverReconnect()
- Returns:
- failoverReconnect true if this is a reconnect
-
setFailoverReconnect
public void setFailoverReconnect(boolean failoverReconnect)
-
getClientIp
public String getClientIp()
-
setClientIp
public void setClientIp(String clientIp)
-
-