org.apache.activemq.broker
Class ConnectionContext

java.lang.Object
  extended by org.apache.activemq.broker.ConnectionContext

public class ConnectionContext
extends Object

Used to hold context information needed to process requests sent to a broker.

Version:
$Revision: 1.5 $

Constructor Summary
ConnectionContext()
           
ConnectionContext(ConnectionInfo info)
           
ConnectionContext(MessageEvaluationContext messageEvaluationContext)
           
 
Method Summary
 Broker getBroker()
           
 String getClientId()
           
 Connection getConnection()
           
 ConnectionId getConnectionId()
           
 Connector getConnector()
           
 Object getLongTermStoreContext()
           
 MessageAuthorizationPolicy getMessageAuthorizationPolicy()
           
 MessageEvaluationContext getMessageEvaluationContext()
           
 SecurityContext getSecurityContext()
           
 AtomicBoolean getStopping()
           
 Transaction getTransaction()
           
 ConcurrentHashMap<TransactionId,Transaction> getTransactions()
           
 String getUserName()
           
 WireFormatInfo getWireFormatInfo()
           
 boolean isAllowedToConsume(MessageReference n)
           
 boolean isClientMaster()
           
 boolean isDontSendReponse()
           
 boolean isFaultTolerant()
           
 boolean isHaAware()
           
 boolean isInRecoveryMode()
           
 boolean isInTransaction()
           
 boolean isNetworkConnection()
           
 boolean isProducerFlowControl()
           
 boolean isSlave()
           
 void setBroker(Broker broker)
           
 void setClientId(String clientId)
           
 void setClientMaster(boolean clientMaster)
           
 void setConnection(Connection connection)
           
 void setConnectionId(ConnectionId connectionId)
           
 void setConnector(Connector connector)
           
 void setDontSendReponse(boolean b)
           
 void setFaultTolerant(boolean faultTolerant)
           
 void setHaAware(boolean haAware)
           
 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 message
 void setNetworkConnection(boolean networkConnection)
           
 void setProducerFlowControl(boolean disableProducerFlowControl)
           
 void setSecurityContext(SecurityContext subject)
           
 void setTransaction(Transaction transaction)
           
 void setTransactions(ConcurrentHashMap<TransactionId,Transaction> transactions)
           
protected  void setUserName(String userName)
           
 void setWireFormatInfo(WireFormatInfo wireFormatInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionContext

public ConnectionContext()

ConnectionContext

public ConnectionContext(MessageEvaluationContext messageEvaluationContext)

ConnectionContext

public ConnectionContext(ConnectionInfo info)
Method Detail

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:

setInRecoveryMode

public void setInRecoveryMode(boolean inRecoveryMode)

getTransactions

public ConcurrentHashMap<TransactionId,Transaction> getTransactions()

setTransactions

public void setTransactions(ConcurrentHashMap<TransactionId,Transaction> transactions)

isInTransaction

public boolean isInTransaction()

getClientId

public String getClientId()

setClientId

public void setClientId(String clientId)

isHaAware

public boolean isHaAware()

setHaAware

public void setHaAware(boolean haAware)

getWireFormatInfo

public WireFormatInfo getWireFormatInfo()

setWireFormatInfo

public void setWireFormatInfo(WireFormatInfo wireFormatInfo)

getConnectionId

public ConnectionId getConnectionId()

setConnectionId

public void setConnectionId(ConnectionId connectionId)

getUserName

public String getUserName()

setUserName

protected void setUserName(String userName)

getMessageEvaluationContext

public 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(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()

isSlave

public boolean isSlave()
Returns:
the slave

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)


Copyright © 2008. All Rights Reserved.