org.apache.activemq.state
Class ConnectionStateTracker
java.lang.Object
org.apache.activemq.state.ConnectionStateTracker
- All Implemented Interfaces:
- CommandVisitor
public class ConnectionStateTracker
- extends java.lang.Object
- implements CommandVisitor
Tracks the state of a connection so a newly established transport can
be re-initialized to the state that was tracked.
- Version:
- $Revision$
Field Summary |
protected edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap |
connectionStates
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
connectionStates
protected final edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap connectionStates
ConnectionStateTracker
public ConnectionStateTracker()
track
public Tracked track(Command command)
throws java.io.IOException
- Parameters:
command
-
- Returns:
- null if the command is not state tracked.
- Throws:
java.io.IOException
restore
public void restore(Transport transport)
throws java.io.IOException
- Throws:
java.io.IOException
restoreSessions
protected void restoreSessions(Transport transport,
ConnectionState connectionState)
throws java.io.IOException
- Parameters:
transport
- connectionState
-
- Throws:
java.io.IOException
restoreConsumers
protected void restoreConsumers(Transport transport,
SessionState sessionState)
throws java.io.IOException
- Parameters:
transport
- sessionState
-
- Throws:
java.io.IOException
restoreProducers
protected void restoreProducers(Transport transport,
SessionState sessionState)
throws java.io.IOException
- Parameters:
transport
- sessionState
-
- Throws:
java.io.IOException
restoreTempDestinations
protected void restoreTempDestinations(Transport transport,
ConnectionState connectionState)
throws java.io.IOException
- Parameters:
transport
- connectionState
-
- Throws:
java.io.IOException
processAddDestination
public Response processAddDestination(DestinationInfo info)
throws java.lang.Exception
- Specified by:
processAddDestination
in interface CommandVisitor
- Throws:
java.lang.Exception
processRemoveDestination
public Response processRemoveDestination(DestinationInfo info)
throws java.lang.Exception
- Specified by:
processRemoveDestination
in interface CommandVisitor
- Throws:
java.lang.Exception
processAddProducer
public Response processAddProducer(ProducerInfo info)
throws java.lang.Exception
- Specified by:
processAddProducer
in interface CommandVisitor
- Throws:
java.lang.Exception
processRemoveProducer
public Response processRemoveProducer(ProducerId id)
throws java.lang.Exception
- Specified by:
processRemoveProducer
in interface CommandVisitor
- Throws:
java.lang.Exception
processAddConsumer
public Response processAddConsumer(ConsumerInfo info)
throws java.lang.Exception
- Specified by:
processAddConsumer
in interface CommandVisitor
- Throws:
java.lang.Exception
processRemoveConsumer
public Response processRemoveConsumer(ConsumerId id)
throws java.lang.Exception
- Specified by:
processRemoveConsumer
in interface CommandVisitor
- Throws:
java.lang.Exception
processAddSession
public Response processAddSession(SessionInfo info)
throws java.lang.Exception
- Specified by:
processAddSession
in interface CommandVisitor
- Throws:
java.lang.Exception
processRemoveSession
public Response processRemoveSession(SessionId id)
throws java.lang.Exception
- Specified by:
processRemoveSession
in interface CommandVisitor
- Throws:
java.lang.Exception
processAddConnection
public Response processAddConnection(ConnectionInfo info)
throws java.lang.Exception
- Specified by:
processAddConnection
in interface CommandVisitor
- Throws:
java.lang.Exception
processRemoveConnection
public Response processRemoveConnection(ConnectionId id)
throws java.lang.Exception
- Specified by:
processRemoveConnection
in interface CommandVisitor
- Throws:
java.lang.Exception
processRemoveSubscription
public Response processRemoveSubscription(RemoveSubscriptionInfo info)
throws java.lang.Exception
- Specified by:
processRemoveSubscription
in interface CommandVisitor
- Throws:
java.lang.Exception
processMessage
public Response processMessage(Message send)
throws java.lang.Exception
- Specified by:
processMessage
in interface CommandVisitor
- Throws:
java.lang.Exception
processMessageAck
public Response processMessageAck(MessageAck ack)
throws java.lang.Exception
- Specified by:
processMessageAck
in interface CommandVisitor
- Throws:
java.lang.Exception
processBeginTransaction
public Response processBeginTransaction(TransactionInfo info)
throws java.lang.Exception
- Specified by:
processBeginTransaction
in interface CommandVisitor
- Throws:
java.lang.Exception
processPrepareTransaction
public Response processPrepareTransaction(TransactionInfo info)
throws java.lang.Exception
- Specified by:
processPrepareTransaction
in interface CommandVisitor
- Throws:
java.lang.Exception
processCommitTransactionOnePhase
public Response processCommitTransactionOnePhase(TransactionInfo info)
throws java.lang.Exception
- Specified by:
processCommitTransactionOnePhase
in interface CommandVisitor
- Throws:
java.lang.Exception
processCommitTransactionTwoPhase
public Response processCommitTransactionTwoPhase(TransactionInfo info)
throws java.lang.Exception
- Specified by:
processCommitTransactionTwoPhase
in interface CommandVisitor
- Throws:
java.lang.Exception
processRollbackTransaction
public Response processRollbackTransaction(TransactionInfo info)
throws java.lang.Exception
- Specified by:
processRollbackTransaction
in interface CommandVisitor
- Throws:
java.lang.Exception
processEndTransaction
public Response processEndTransaction(TransactionInfo info)
throws java.lang.Exception
- Specified by:
processEndTransaction
in interface CommandVisitor
- Throws:
java.lang.Exception
processRecoverTransactions
public Response processRecoverTransactions(TransactionInfo info)
- Specified by:
processRecoverTransactions
in interface CommandVisitor
processForgetTransaction
public Response processForgetTransaction(TransactionInfo info)
throws java.lang.Exception
- Specified by:
processForgetTransaction
in interface CommandVisitor
- Throws:
java.lang.Exception
processWireFormat
public Response processWireFormat(WireFormatInfo info)
throws java.lang.Exception
- Specified by:
processWireFormat
in interface CommandVisitor
- Throws:
java.lang.Exception
processKeepAlive
public Response processKeepAlive(KeepAliveInfo info)
throws java.lang.Exception
- Specified by:
processKeepAlive
in interface CommandVisitor
- Throws:
java.lang.Exception
processShutdown
public Response processShutdown(ShutdownInfo info)
throws java.lang.Exception
- Specified by:
processShutdown
in interface CommandVisitor
- Throws:
java.lang.Exception
processBrokerInfo
public Response processBrokerInfo(BrokerInfo info)
throws java.lang.Exception
- Specified by:
processBrokerInfo
in interface CommandVisitor
- Throws:
java.lang.Exception
processFlush
public Response processFlush(FlushCommand command)
throws java.lang.Exception
- Specified by:
processFlush
in interface CommandVisitor
- Throws:
java.lang.Exception
processMessageDispatchNotification
public Response processMessageDispatchNotification(MessageDispatchNotification notification)
throws java.lang.Exception
- Specified by:
processMessageDispatchNotification
in interface CommandVisitor
- Throws:
java.lang.Exception
processMessagePull
public Response processMessagePull(MessagePull pull)
throws java.lang.Exception
- Specified by:
processMessagePull
in interface CommandVisitor
- Throws:
java.lang.Exception
isRestoreConsumers
public boolean isRestoreConsumers()
setRestoreConsumers
public void setRestoreConsumers(boolean restoreConsumers)
isRestoreProducers
public boolean isRestoreProducers()
setRestoreProducers
public void setRestoreProducers(boolean restoreProducers)
isRestoreSessions
public boolean isRestoreSessions()
setRestoreSessions
public void setRestoreSessions(boolean restoreSessions)
isTrackTransactions
public boolean isTrackTransactions()
setTrackTransactions
public void setTrackTransactions(boolean trackTransactions)
isRestoreTransaction
public boolean isRestoreTransaction()
setRestoreTransaction
public void setRestoreTransaction(boolean restoreTransaction)
Copyright © 2010 Apache Software Foundation. All Rights Reserved.