Package org.apache.activemq.broker
Class ConnectionContext
- java.lang.Object
-
- org.apache.activemq.broker.ConnectionContext
-
public class ConnectionContext extends Object
Used to hold context information needed to process requests sent to a broker.
-
-
Constructor Summary
Constructors Constructor Description ConnectionContext()
ConnectionContext(org.apache.activemq.command.ConnectionInfo info)
ConnectionContext(org.apache.activemq.filter.MessageEvaluationContext messageEvaluationContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionContext
copy()
Broker
getBroker()
String
getClientId()
Connection
getConnection()
org.apache.activemq.command.ConnectionId
getConnectionId()
org.apache.activemq.state.ConnectionState
getConnectionState()
Connector
getConnector()
Object
getLongTermStoreContext()
MessageAuthorizationPolicy
getMessageAuthorizationPolicy()
org.apache.activemq.filter.MessageEvaluationContext
getMessageEvaluationContext()
SecurityContext
getSecurityContext()
AtomicBoolean
getStopping()
Transaction
getTransaction()
ConcurrentMap<org.apache.activemq.command.TransactionId,Transaction>
getTransactions()
String
getUserName()
org.apache.activemq.command.WireFormatInfo
getWireFormatInfo()
org.apache.activemq.command.XATransactionId
getXid()
boolean
isAllowedToConsume(org.apache.activemq.broker.region.MessageReference n)
boolean
isAllowLinkStealing()
boolean
isClientMaster()
boolean
isDontSendReponse()
boolean
isFaultTolerant()
boolean
isInRecoveryMode()
boolean
isInTransaction()
boolean
isNetworkConnection()
boolean
isProducerFlowControl()
boolean
isReconnect()
void
setBroker(Broker broker)
void
setClientId(String clientId)
void
setClientMaster(boolean clientMaster)
void
setConnection(Connection connection)
void
setConnectionId(org.apache.activemq.command.ConnectionId connectionId)
void
setConnectionState(org.apache.activemq.state.ConnectionState connectionState)
void
setConnector(Connector connector)
void
setDontSendReponse(boolean b)
void
setFaultTolerant(boolean faultTolerant)
void
setInRecoveryMode(boolean inRecoveryMode)
void
setLongTermStoreContext(Object longTermStoreContext)
void
setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy)
Sets the policy used to decide if the current connection is authorized to consume a given messagevoid
setNetworkConnection(boolean networkConnection)
void
setProducerFlowControl(boolean disableProducerFlowControl)
void
setReconnect(boolean reconnect)
void
setSecurityContext(SecurityContext subject)
void
setTransaction(Transaction transaction)
void
setTransactions(ConcurrentMap<org.apache.activemq.command.TransactionId,Transaction> transactions)
protected void
setUserName(String userName)
void
setWireFormatInfo(org.apache.activemq.command.WireFormatInfo wireFormatInfo)
void
setXid(org.apache.activemq.command.XATransactionId id)
-
-
-
Method Detail
-
copy
public ConnectionContext copy()
-
getSecurityContext
public SecurityContext getSecurityContext()
-
setSecurityContext
public void setSecurityContext(SecurityContext subject)
-
getBroker
public Broker getBroker()
- Returns:
- the broker being used.
-
setBroker
public void setBroker(Broker broker)
- Parameters:
broker
- being used
-
getConnection
public Connection getConnection()
- Returns:
- the connection being used
-
setConnection
public void setConnection(Connection connection)
- Parameters:
connection
- being used
-
getTransaction
public Transaction getTransaction()
- Returns:
- the transaction being used.
-
setTransaction
public void setTransaction(Transaction transaction)
- Parameters:
transaction
- being used.
-
getConnector
public Connector getConnector()
- Returns:
- the connector being used.
-
setConnector
public void setConnector(Connector connector)
- Parameters:
connector
- being used.
-
getMessageAuthorizationPolicy
public MessageAuthorizationPolicy getMessageAuthorizationPolicy()
-
setMessageAuthorizationPolicy
public void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy)
Sets the policy used to decide if the current connection is authorized to consume a given message
-
isInRecoveryMode
public boolean isInRecoveryMode()
- Returns:
- true if in recovery mode.
-
setInRecoveryMode
public void setInRecoveryMode(boolean inRecoveryMode)
-
getTransactions
public ConcurrentMap<org.apache.activemq.command.TransactionId,Transaction> getTransactions()
-
setTransactions
public void setTransactions(ConcurrentMap<org.apache.activemq.command.TransactionId,Transaction> transactions)
-
isInTransaction
public boolean isInTransaction()
-
getClientId
public String getClientId()
-
setClientId
public void setClientId(String clientId)
-
isReconnect
public boolean isReconnect()
-
setReconnect
public void setReconnect(boolean reconnect)
-
getWireFormatInfo
public org.apache.activemq.command.WireFormatInfo getWireFormatInfo()
-
setWireFormatInfo
public void setWireFormatInfo(org.apache.activemq.command.WireFormatInfo wireFormatInfo)
-
getConnectionId
public org.apache.activemq.command.ConnectionId getConnectionId()
-
setConnectionId
public void setConnectionId(org.apache.activemq.command.ConnectionId connectionId)
-
getUserName
public String getUserName()
-
setUserName
protected void setUserName(String userName)
-
getMessageEvaluationContext
public org.apache.activemq.filter.MessageEvaluationContext getMessageEvaluationContext()
-
getLongTermStoreContext
public Object getLongTermStoreContext()
-
setLongTermStoreContext
public void setLongTermStoreContext(Object longTermStoreContext)
-
isProducerFlowControl
public boolean isProducerFlowControl()
-
setProducerFlowControl
public void setProducerFlowControl(boolean disableProducerFlowControl)
-
isAllowedToConsume
public boolean isAllowedToConsume(org.apache.activemq.broker.region.MessageReference n) throws IOException
- Throws:
IOException
-
isNetworkConnection
public boolean isNetworkConnection()
-
setNetworkConnection
public void setNetworkConnection(boolean networkConnection)
-
getStopping
public AtomicBoolean getStopping()
-
setDontSendReponse
public void setDontSendReponse(boolean b)
-
isDontSendReponse
public boolean isDontSendReponse()
-
isClientMaster
public boolean isClientMaster()
- Returns:
- the clientMaster
-
setClientMaster
public void setClientMaster(boolean clientMaster)
- Parameters:
clientMaster
- the clientMaster to set
-
isFaultTolerant
public boolean isFaultTolerant()
-
setFaultTolerant
public void setFaultTolerant(boolean faultTolerant)
-
setConnectionState
public void setConnectionState(org.apache.activemq.state.ConnectionState connectionState)
-
getConnectionState
public org.apache.activemq.state.ConnectionState getConnectionState()
-
setXid
public void setXid(org.apache.activemq.command.XATransactionId id)
-
getXid
public org.apache.activemq.command.XATransactionId getXid()
-
isAllowLinkStealing
public boolean isAllowLinkStealing()
-
-