Show / Hide Table of Contents

# Class ConnectionStateTracker

Tracks the state of a connection so a newly established transport can be re-initialized to the state that was tracked.

##### Inheritance

System.Object
CommandVisitorAdapter
ConnectionStateTracker

##### Implements

ICommandVisitor

##### Inherited Members

CommandVisitorAdapter.ProcessBrokerInfo(BrokerInfo)
CommandVisitorAdapter.ProcessFlushCommand(FlushCommand)
CommandVisitorAdapter.ProcessForgetTransaction(TransactionInfo)
CommandVisitorAdapter.ProcessKeepAliveInfo(KeepAliveInfo)
CommandVisitorAdapter.ProcessMessageDispatchNotification(MessageDispatchNotification)
CommandVisitorAdapter.ProcessProducerAck(ProducerAck)
CommandVisitorAdapter.ProcessRecoverTransactions(TransactionInfo)
CommandVisitorAdapter.ProcessRemoveSubscriptionInfo(RemoveSubscriptionInfo)
CommandVisitorAdapter.ProcessShutdownInfo(ShutdownInfo)
CommandVisitorAdapter.ProcessWireFormat(WireFormatInfo)
CommandVisitorAdapter.ProcessMessageDispatch(MessageDispatch)
CommandVisitorAdapter.ProcessControlCommand(ControlCommand)
CommandVisitorAdapter.ProcessConnectionControl(ConnectionControl)
CommandVisitorAdapter.ProcessConnectionError(ConnectionError)
CommandVisitorAdapter.ProcessConsumerControl(ConsumerControl)
CommandVisitorAdapter.ProcessResponse(Response)
CommandVisitorAdapter.ProcessReplayCommand(ReplayCommand)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Apache.NMS.ActiveMQ.State

###### Assembly: Apache.NMS.ActiveMQ.dll

##### Syntax

    public class ConnectionStateTracker : CommandVisitorAdapter, ICommandVisitor

### Fields

| Improve this Doc View Source

#### connectionStates

##### Declaration

    protected readonly Dictionary<ConnectionId, ConnectionState> connectionStates

##### Field Value

Type | Description
--- | ---
System.Collections.Generic.Dictionary<ConnectionId, ConnectionState> |

### Properties

| Improve this Doc View Source

#### MaxCacheSize

##### Declaration

    public int MaxCacheSize { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### RestoreConsumers

##### Declaration

    public bool RestoreConsumers { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### RestoreProducers

##### Declaration

    public bool RestoreProducers { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### RestoreSessions

##### Declaration

    public bool RestoreSessions { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### RestoreTransaction

##### Declaration

    public bool RestoreTransaction { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### TrackMessages

##### Declaration

    public bool TrackMessages { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### TrackTransactionProducers

##### Declaration

    public bool TrackTransactionProducers { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### TrackTransactions

##### Declaration

    public bool TrackTransactions { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

### Methods

| Improve this Doc View Source

#### ConnectionInterruptProcessingComplete(ITransport, ConnectionId)

##### Declaration

    public void ConnectionInterruptProcessingComplete(ITransport transport, ConnectionId connectionId)

##### Parameters

Type | Name | Description
--- | --- | ---
ITransport | transport |
ConnectionId | connectionId |

| Improve this Doc View Source

#### DoRestore(ITransport)

##### Declaration

    public void DoRestore(ITransport transport)

##### Parameters

Type | Name | Description
--- | --- | ---
ITransport | transport |

| Improve this Doc View Source

#### DoRestoreConsumers(ITransport, SessionState)

##### Declaration

    protected void DoRestoreConsumers(ITransport transport, SessionState sessionState)

##### Parameters

Type | Name | Description
--- | --- | ---
ITransport | transport |
SessionState | sessionState |

| Improve this Doc View Source

#### DoRestoreProducers(ITransport, SessionState)

##### Declaration

    protected void DoRestoreProducers(ITransport transport, SessionState sessionState)

##### Parameters

Type | Name | Description
--- | --- | ---
ITransport | transport |
SessionState | sessionState |

| Improve this Doc View Source

#### DoRestoreSessions(ITransport, ConnectionState)

##### Declaration

    protected void DoRestoreSessions(ITransport transport, ConnectionState connectionState)

##### Parameters

Type | Name | Description
--- | --- | ---
ITransport | transport |
ConnectionState | connectionState |

| Improve this Doc View Source

#### DoRestoreTempDestinations(ITransport, ConnectionState)

##### Declaration

    protected void DoRestoreTempDestinations(ITransport transport, ConnectionState connectionState)

##### Parameters

Type | Name | Description
--- | --- | ---
ITransport | transport |
ConnectionState | connectionState |

| Improve this Doc View Source

#### ProcessAddConnection(ConnectionInfo)

##### Declaration

    public override Response ProcessAddConnection(ConnectionInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
ConnectionInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessAddConnection(ConnectionInfo)
| Improve this Doc View Source

#### ProcessAddConsumer(ConsumerInfo)

##### Declaration

    public override Response ProcessAddConsumer(ConsumerInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
ConsumerInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessAddConsumer(ConsumerInfo)
| Improve this Doc View Source

#### ProcessAddDestination(DestinationInfo)

##### Declaration

    public override Response ProcessAddDestination(DestinationInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
DestinationInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessAddDestination(DestinationInfo)
| Improve this Doc View Source

#### ProcessAddProducer(ProducerInfo)

##### Declaration

    public override Response ProcessAddProducer(ProducerInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
ProducerInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessAddProducer(ProducerInfo)
| Improve this Doc View Source

#### ProcessAddSession(SessionInfo)

##### Declaration

    public override Response ProcessAddSession(SessionInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
SessionInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessAddSession(SessionInfo)
| Improve this Doc View Source

#### ProcessBeginTransaction(TransactionInfo)

##### Declaration

    public override Response ProcessBeginTransaction(TransactionInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
TransactionInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessBeginTransaction(TransactionInfo)
| Improve this Doc View Source

#### ProcessCommitTransactionOnePhase(TransactionInfo)

##### Declaration

    public override Response ProcessCommitTransactionOnePhase(TransactionInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
TransactionInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessCommitTransactionOnePhase(TransactionInfo)
| Improve this Doc View Source

#### ProcessCommitTransactionTwoPhase(TransactionInfo)

##### Declaration

    public override Response ProcessCommitTransactionTwoPhase(TransactionInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
TransactionInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessCommitTransactionTwoPhase(TransactionInfo)
| Improve this Doc View Source

#### ProcessEndTransaction(TransactionInfo)

##### Declaration

    public override Response ProcessEndTransaction(TransactionInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
TransactionInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessEndTransaction(TransactionInfo)
| Improve this Doc View Source

#### ProcessMessage(Message)

##### Declaration

    public override Response ProcessMessage(Message send)

##### Parameters

Type | Name | Description
--- | --- | ---
Message | send |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessMessage(Message)
| Improve this Doc View Source

#### ProcessMessageAck(MessageAck)

##### Declaration

    public override Response ProcessMessageAck(MessageAck ack)

##### Parameters

Type | Name | Description
--- | --- | ---
MessageAck | ack |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessMessageAck(MessageAck)
| Improve this Doc View Source

#### ProcessMessagePull(MessagePull)

##### Declaration

    public override Response ProcessMessagePull(MessagePull pull)

##### Parameters

Type | Name | Description
--- | --- | ---
MessagePull | pull |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessMessagePull(MessagePull)
| Improve this Doc View Source

#### ProcessPrepareTransaction(TransactionInfo)

##### Declaration

    public override Response ProcessPrepareTransaction(TransactionInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
TransactionInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessPrepareTransaction(TransactionInfo)
| Improve this Doc View Source

#### ProcessRemoveConnection(ConnectionId)

##### Declaration

    public override Response ProcessRemoveConnection(ConnectionId id)

##### Parameters

Type | Name | Description
--- | --- | ---
ConnectionId | id |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessRemoveConnection(ConnectionId)
| Improve this Doc View Source

#### ProcessRemoveConsumer(ConsumerId)

##### Declaration

    public override Response ProcessRemoveConsumer(ConsumerId id)

##### Parameters

Type | Name | Description
--- | --- | ---
ConsumerId | id |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessRemoveConsumer(ConsumerId)
| Improve this Doc View Source

#### ProcessRemoveDestination(DestinationInfo)

##### Declaration

    public override Response ProcessRemoveDestination(DestinationInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
DestinationInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessRemoveDestination(DestinationInfo)
| Improve this Doc View Source

#### ProcessRemoveProducer(ProducerId)

##### Declaration

    public override Response ProcessRemoveProducer(ProducerId id)

##### Parameters

Type | Name | Description
--- | --- | ---
ProducerId | id |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessRemoveProducer(ProducerId)
| Improve this Doc View Source

#### ProcessRemoveSession(SessionId)

##### Declaration

    public override Response ProcessRemoveSession(SessionId id)

##### Parameters

Type | Name | Description
--- | --- | ---
SessionId | id |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessRemoveSession(SessionId)
| Improve this Doc View Source

#### ProcessRollbackTransaction(TransactionInfo)

##### Declaration

    public override Response ProcessRollbackTransaction(TransactionInfo info)

##### Parameters

Type | Name | Description
--- | --- | ---
TransactionInfo | info |

##### Returns

Type | Description
--- | ---
Response |

##### Overrides

CommandVisitorAdapter.ProcessRollbackTransaction(TransactionInfo)
| Improve this Doc View Source

#### Track(Command)

##### Declaration

    public Tracked Track(Command command)

##### Parameters

Type | Name | Description
--- | --- | ---
Command | command |

##### Returns

Type | Description
--- | ---
Tracked | null if the command is not state tracked.

| Improve this Doc View Source

#### TrackBack(Command)

##### Declaration

    public void TrackBack(Command command)

##### Parameters

Type | Name | Description
--- | --- | ---
Command | command |

| Improve this Doc View Source

#### TransportInterrupted(ConnectionId)

##### Declaration

    public void TransportInterrupted(ConnectionId id)

##### Parameters

Type | Name | Description
--- | --- | ---
ConnectionId | id |

### Implements

ICommandVisitor