|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.broker.TransportConnection
public class TransportConnection
Field Summary | |
---|---|
protected Broker |
broker
|
protected java.util.Map<ConnectionId,ConnectionState> |
brokerConnectionStates
|
protected BrokerInfo |
brokerInfo
|
protected TransportConnector |
connector
|
protected java.util.List<Command> |
dispatchQueue
|
protected java.util.concurrent.atomic.AtomicBoolean |
dispatchStopped
|
protected TaskRunner |
taskRunner
|
protected java.util.concurrent.atomic.AtomicReference<java.io.IOException> |
transportException
|
Constructor Summary | |
---|---|
TransportConnection(TransportConnector connector,
Transport transport,
Broker broker,
TaskRunnerFactory taskRunnerFactory)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Broker broker
protected final TransportConnector connector
protected final java.util.Map<ConnectionId,ConnectionState> brokerConnectionStates
protected BrokerInfo brokerInfo
protected final java.util.List<Command> dispatchQueue
protected TaskRunner taskRunner
protected final java.util.concurrent.atomic.AtomicReference<java.io.IOException> transportException
protected java.util.concurrent.atomic.AtomicBoolean dispatchStopped
Constructor Detail |
---|
public TransportConnection(TransportConnector connector, Transport transport, Broker broker, TaskRunnerFactory taskRunnerFactory)
connector
- transport
- broker
- taskRunnerFactory
- - can be null if you want direct dispatch to the transport
else commands are sent async.Method Detail |
---|
public int getDispatchQueueSize()
getDispatchQueueSize
in interface Connection
public void serviceTransportException(java.io.IOException e)
public void serviceExceptionAsync(java.io.IOException e)
serviceExceptionAsync
in interface Connection
e
- public void serviceException(java.lang.Throwable e)
serviceException
in interface Connection
public Response service(Command command)
Connection
service
in interface Connection
public Response processKeepAlive(KeepAliveInfo info) throws java.lang.Exception
processKeepAlive
in interface CommandVisitor
java.lang.Exception
public Response processRemoveSubscription(RemoveSubscriptionInfo info) throws java.lang.Exception
processRemoveSubscription
in interface CommandVisitor
java.lang.Exception
public Response processWireFormat(WireFormatInfo info) throws java.lang.Exception
processWireFormat
in interface CommandVisitor
java.lang.Exception
public Response processShutdown(ShutdownInfo info) throws java.lang.Exception
processShutdown
in interface CommandVisitor
java.lang.Exception
public Response processFlush(FlushCommand command) throws java.lang.Exception
processFlush
in interface CommandVisitor
java.lang.Exception
public Response processBeginTransaction(TransactionInfo info) throws java.lang.Exception
processBeginTransaction
in interface CommandVisitor
java.lang.Exception
public Response processEndTransaction(TransactionInfo info) throws java.lang.Exception
processEndTransaction
in interface CommandVisitor
java.lang.Exception
public Response processPrepareTransaction(TransactionInfo info) throws java.lang.Exception
processPrepareTransaction
in interface CommandVisitor
java.lang.Exception
public Response processCommitTransactionOnePhase(TransactionInfo info) throws java.lang.Exception
processCommitTransactionOnePhase
in interface CommandVisitor
java.lang.Exception
public Response processCommitTransactionTwoPhase(TransactionInfo info) throws java.lang.Exception
processCommitTransactionTwoPhase
in interface CommandVisitor
java.lang.Exception
public Response processRollbackTransaction(TransactionInfo info) throws java.lang.Exception
processRollbackTransaction
in interface CommandVisitor
java.lang.Exception
public Response processForgetTransaction(TransactionInfo info) throws java.lang.Exception
processForgetTransaction
in interface CommandVisitor
java.lang.Exception
public Response processRecoverTransactions(TransactionInfo info) throws java.lang.Exception
processRecoverTransactions
in interface CommandVisitor
java.lang.Exception
public Response processMessage(Message messageSend) throws java.lang.Exception
processMessage
in interface CommandVisitor
java.lang.Exception
public Response processMessageAck(MessageAck ack) throws java.lang.Exception
processMessageAck
in interface CommandVisitor
java.lang.Exception
public Response processMessagePull(MessagePull pull) throws java.lang.Exception
processMessagePull
in interface CommandVisitor
java.lang.Exception
public Response processMessageDispatchNotification(MessageDispatchNotification notification) throws java.lang.Exception
processMessageDispatchNotification
in interface CommandVisitor
java.lang.Exception
public Response processAddDestination(DestinationInfo info) throws java.lang.Exception
processAddDestination
in interface CommandVisitor
java.lang.Exception
public Response processRemoveDestination(DestinationInfo info) throws java.lang.Exception
processRemoveDestination
in interface CommandVisitor
java.lang.Exception
public Response processAddProducer(ProducerInfo info) throws java.lang.Exception
processAddProducer
in interface CommandVisitor
java.lang.Exception
public Response processRemoveProducer(ProducerId id) throws java.lang.Exception
processRemoveProducer
in interface CommandVisitor
java.lang.Exception
public Response processAddConsumer(ConsumerInfo info) throws java.lang.Exception
processAddConsumer
in interface CommandVisitor
java.lang.Exception
public Response processRemoveConsumer(ConsumerId id, long lastDeliveredSequenceId) throws java.lang.Exception
processRemoveConsumer
in interface CommandVisitor
java.lang.Exception
public Response processAddSession(SessionInfo info) throws java.lang.Exception
processAddSession
in interface CommandVisitor
java.lang.Exception
public Response processRemoveSession(SessionId id, long lastDeliveredSequenceId) throws java.lang.Exception
processRemoveSession
in interface CommandVisitor
java.lang.Exception
public Response processAddConnection(ConnectionInfo info) throws java.lang.Exception
processAddConnection
in interface CommandVisitor
java.lang.Exception
public Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId) throws java.lang.InterruptedException
processRemoveConnection
in interface CommandVisitor
java.lang.InterruptedException
public Response processProducerAck(ProducerAck ack) throws java.lang.Exception
processProducerAck
in interface CommandVisitor
java.lang.Exception
public Connector getConnector()
getConnector
in interface Connection
public void dispatchSync(Command message)
Connection
dispatchSync
in interface Connection
message
- the message to send to the client.public void dispatchAsync(Command message)
Connection
dispatchAsync
in interface Connection
protected void processDispatch(Command command) throws java.io.IOException
java.io.IOException
public boolean iterate()
iterate
in interface Task
public ConnectionStatistics getStatistics()
getStatistics
in interface Connection
public MessageAuthorizationPolicy getMessageAuthorizationPolicy()
public void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy)
public boolean isManageable()
isManageable
in interface Connection
public void start() throws java.lang.Exception
start
in interface Service
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface Service
java.lang.Exception
public void stopAsync()
public java.lang.String toString()
toString
in class java.lang.Object
protected void doStop() throws java.lang.Exception, java.lang.InterruptedException
java.lang.Exception
java.lang.InterruptedException
public boolean isBlockedCandidate()
public void setBlockedCandidate(boolean blockedCandidate)
blockedCandidate
- The blockedCandidate to set.public boolean isMarkedCandidate()
public void setMarkedCandidate(boolean markedCandidate)
markedCandidate
- The markedCandidate to set.public void setSlow(boolean slow)
slow
- The slow to set.public boolean isSlow()
isSlow
in interface Connection
public boolean isMarkedBlockedCandidate()
public void doMark()
public boolean isBlocked()
isBlocked
in interface Connection
public boolean isConnected()
isConnected
in interface Connection
public void setBlocked(boolean blocked)
blocked
- The blocked to set.public void setConnected(boolean connected)
connected
- The connected to set.public boolean isActive()
isActive
in interface Connection
public void setActive(boolean active)
active
- The active to set.public boolean isStarting()
public boolean isNetworkConnection()
Connection
isNetworkConnection
in interface Connection
public boolean isFaultTolerantConnection()
isFaultTolerantConnection
in interface Connection
protected void setStarting(boolean starting)
public boolean isPendingStop()
protected void setPendingStop(boolean pendingStop)
public Response processBrokerInfo(BrokerInfo info)
processBrokerInfo
in interface CommandVisitor
protected void dispatch(Command command) throws java.io.IOException
java.io.IOException
public java.lang.String getRemoteAddress()
getRemoteAddress
in interface Connection
public java.lang.String getConnectionId()
getConnectionId
in interface Connection
public void updateClient(ConnectionControl control)
updateClient
in interface Connection
public int getProtocolVersion()
public Response processControlCommand(ControlCommand command) throws java.lang.Exception
processControlCommand
in interface CommandVisitor
java.lang.Exception
public Response processMessageDispatch(MessageDispatch dispatch) throws java.lang.Exception
processMessageDispatch
in interface CommandVisitor
java.lang.Exception
public Response processConnectionControl(ConnectionControl control) throws java.lang.Exception
processConnectionControl
in interface CommandVisitor
java.lang.Exception
public Response processConnectionError(ConnectionError error) throws java.lang.Exception
processConnectionError
in interface CommandVisitor
java.lang.Exception
public Response processConsumerControl(ConsumerControl control) throws java.lang.Exception
processConsumerControl
in interface CommandVisitor
java.lang.Exception
protected TransportConnectionState registerConnectionState(ConnectionId connectionId, TransportConnectionState state)
protected TransportConnectionState unregisterConnectionState(ConnectionId connectionId)
protected java.util.List<TransportConnectionState> listConnectionStates()
protected TransportConnectionState lookupConnectionState(java.lang.String connectionId)
protected TransportConnectionState lookupConnectionState(ConsumerId id)
protected TransportConnectionState lookupConnectionState(ProducerId id)
protected TransportConnectionState lookupConnectionState(SessionId id)
protected TransportConnectionState lookupConnectionState(ConnectionId connectionId)
protected void setDuplexNetworkConnectorId(java.lang.String duplexNetworkConnectorId)
protected java.lang.String getDuplexNetworkConnectorId()
protected java.util.concurrent.CountDownLatch getStopped()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |