Proton DotNet
Loading...
Searching...
No Matches
Classes | Public Member Functions | Properties | List of all members
Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager Class Referencesealed

Proton transaction manager abstraction that provides the transaction services for a Receiver link that handles the transaction Declare and Discharge commands which control the lifetime and outcome of a running transaction. More...

Inheritance diagram for Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager:
Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< ITransactionManager > Apache.Qpid.Proton.Engine.ITransactionManager Apache.Qpid.Proton.Engine.IEndpoint< ITransactionManager >

Public Member Functions

 ProtonTransactionManager (ProtonReceiver receiver)
 
ITransactionManager AddCredit (uint credit)
 Adds the given amount of credit for the transaction manager which allows the remote transaction controller to send declare and discharge requests to this manager. The remote transaction controller cannot send any requests to start or complete a transaction without having credit to do so which implies that the transaction manager owner must grant credit as part of its normal processing.
 
override ITransactionManager Open ()
 
override ITransactionManager Close ()
 
ITransactionManager Declared (ITransaction< ITransactionManager > transaction, byte[] txnId)
 Respond to a previous declare request from the remote transaction controller indicating that the requested transaction has been successfully declared and that deliveries can now be enlisted in that transaction.
 
ITransactionManager Declared (ITransaction< ITransactionManager > transaction, IProtonBuffer txnId)
 Respond to a previous declare request from the remote transaction controller indicating that the requested transaction has been successfully declared and that deliveries can now be enlisted in that transaction.
 
ITransactionManager Discharged (ITransaction< ITransactionManager > transaction)
 Respond to a previous discharge request from the remote transaction controller indicating that the discharge completed on the transaction identified by given transaction Id has now been retired.
 
ITransactionManager DeclareFailed (ITransaction< ITransactionManager > transaction, ErrorCondition condition)
 Respond to a previous declare request from the remote transaction controller indicating that the requested transaction declaration has failed and is not active.
 
ITransactionManager DischargeFailed (ITransaction< ITransactionManager > transaction, ErrorCondition condition)
 Respond to a previous discharge request from the remote transaction controller indicating that the discharge resulted in an error and the transaction must be considered rolled back.
 
ITransactionManager DeclareHandler (Action< ITransaction< ITransactionManager > > handler)
 Called when the remote transaction controller end of the link has requested a new transaction be declared using the information provided in the given declare instance.
 
ITransactionManager DischargeHandler (Action< ITransaction< ITransactionManager > > handler)
 Called when the remote transaction controller end of the link has requested a current transaction be discharged using the information provided in the given discharge instance.
 
ITransactionManager ParentEndpointClosedHandler (Action< ITransactionManager > handler)
 Sets a Action delegate for when the parent Session or Connection of this link is locally closed. Typically used by clients for logging or other state update event processing. Clients should not perform any blocking calls within this context. It is an error for the handler to throw an exception and the outcome of doing so is undefined.
 
- Public Member Functions inherited from Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< ITransactionManager >
 ProtonEndpoint (ProtonEngine engine)
 Creates a new instance of this endpoint implementation which is owned by the provided engine instance.
 
OpenHandler (Action< T > openHandler)
 Sets a Action for when an AMQP Open frame is received from the remote peer. Used to process remotely initiated Connections. Locally initiated sessions have their own Action invoked instead. This method is typically used by servers to listen for the remote peer to open its endpoint, while a client would listen for the server to open its end of the endpoint once a local open has been performed. Typically used by clients as servers will typically listen to some parent resource event handler to determine if the remote is initiating a resource open.
 
CloseHandler (Action< T > closeHandler)
 Sets a EventHandler for when an AMQP closing frame is received from the remote peer.
 
LocalOpenHandler (Action< T > localOpenHandler)
 Sets a Action for when an this endpoint is opened locally via a call to Open. Typically used by clients for logging or other state update event processing. Clients should not perform any blocking calls within this context. It is an error for the handler to throw an exception and the outcome of doing so is undefined. Typically used by clients as servers will typically listen to some parent resource event handler to determine if the remote is initiating a resource open.
 
LocalCloseHandler (Action< T > localCloseHandler)
 Sets a Action for when an this endpoint is closed locally via a call to Close. Typically used by clients for logging or other state update event processing. Clients should not perform any blocking calls within this context. It is an error for the handler to throw an exception and the outcome of doing so is undefined.
 
EngineShutdownHandler (Action< IEngine > shutdownHandler)
 Sets an Action that is invoked when the engine that supports this endpoint is shutdown which indicates a desire to terminate all engine operations. Any endpoint that has been both locally and remotely closed will not receive this event as it will no longer be tracked by the parent its parent endpoint. A typical use of this event would be from a locally closed endpoint that is awaiting response from the remote. If this event fires then there will never be a remote response to any pending operations and the client or server instance should react accordingly to clean up any related resources etc.
 
Close ()
 Close the end point locally and send the closing performative immediately if possible or holds it until the Connection / Engine state allows it. If the engine encounters an error writing the performative or the engine is in a failed state from a previous error then this method will throw an exception. If the engine has been shutdown then this method will close out the local end of the endpoint and clean up any local resources before returning normally.
 
Open ()
 Open the end point locally, sending the Open performative immediately if possible or holding it until SASL negotiations or the AMQP header exchange and other required performative exchanges has completed. The endpoint will signal any registered handler of the remote opening the endpoint once the remote performative that signals open completion arrives.
 
- Public Member Functions inherited from Apache.Qpid.Proton.Engine.IEndpoint< ITransactionManager >
Open ()
 Open the end point locally, sending the Open performative immediately if possible or holding it until SASL negotiations or the AMQP header exchange and other required performative exchanges has completed. The endpoint will signal any registered handler of the remote opening the endpoint once the remote performative that signals open completion arrives.
 
Close ()
 Close the end point locally and send the closing performative immediately if possible or holds it until the Connection / Engine state allows it. If the engine encounters an error writing the performative or the engine is in a failed state from a previous error then this method will throw an exception. If the engine has been shutdown then this method will close out the local end of the endpoint and clean up any local resources before returning normally.
 
LocalOpenHandler (Action< T > localOpenHandler)
 Sets a Action for when an this endpoint is opened locally via a call to Open. Typically used by clients for logging or other state update event processing. Clients should not perform any blocking calls within this context. It is an error for the handler to throw an exception and the outcome of doing so is undefined. Typically used by clients as servers will typically listen to some parent resource event handler to determine if the remote is initiating a resource open.
 
LocalCloseHandler (Action< T > localCloseHandler)
 Sets a Action for when an this endpoint is closed locally via a call to Close. Typically used by clients for logging or other state update event processing. Clients should not perform any blocking calls within this context. It is an error for the handler to throw an exception and the outcome of doing so is undefined.
 
OpenHandler (Action< T > localOpenHandler)
 Sets a Action for when an AMQP Open frame is received from the remote peer. Used to process remotely initiated Connections. Locally initiated sessions have their own Action invoked instead. This method is typically used by servers to listen for the remote peer to open its endpoint, while a client would listen for the server to open its end of the endpoint once a local open has been performed. Typically used by clients as servers will typically listen to some parent resource event handler to determine if the remote is initiating a resource open.
 
CloseHandler (Action< T > localCloseHandler)
 Sets a EventHandler for when an AMQP closing frame is received from the remote peer.
 
EngineShutdownHandler (Action< IEngine > shutdownHandler)
 Sets an Action that is invoked when the engine that supports this endpoint is shutdown which indicates a desire to terminate all engine operations. Any endpoint that has been both locally and remotely closed will not receive this event as it will no longer be tracked by the parent its parent endpoint. A typical use of this event would be from a locally closed endpoint that is awaiting response from the remote. If this event fires then there will never be a remote response to any pending operations and the client or server instance should react accordingly to clean up any related resources etc.
 

Properties

IConnection Connection [get]
 Provides access to the connection that owns this transaction manager endpoint.
 
ISession Session [get]
 Provides access to the session that created this transaction manager.
 
uint Credit [get]
 Retrieves the current amount of link credit that is assigned to the remote for sending transaction work requests.
 
override bool IsLocallyOpen [get]
 
override bool IsLocallyClosed [get]
 
override bool IsRemotelyOpen [get]
 
override bool IsRemotelyClosed [get]
 
override ErrorCondition ErrorCondition [get, set]
 
override ErrorCondition RemoteErrorCondition [get]
 
override Symbol[] OfferedCapabilities [get, set]
 
override Symbol[] RemoteOfferedCapabilities [get]
 
override Symbol[] DesiredCapabilities [get, set]
 
override Symbol[] RemoteDesiredCapabilities [get]
 
override IReadOnlyDictionary< Symbol, object > Properties [get, set]
 
override IReadOnlyDictionary< Symbol, object > RemoteProperties [get]
 
Source Source [get, set]
 Access the Source value to assign to the local end of this transaction manager link. Must be called during link setup, i.e. before calling the open method.
 
Source RemoteSource [get]
 Gets the Source value to assign to the remote end of this transaction manager link. Must be called during link setup, i.e. before calling the open method.
 
Coordinator Coordinator [get, set]
 Access the Coordinator value to assign to the local end of this transaction manager link. Must be called during link setup, i.e. before calling the open method.
 
Coordinator RemoteCoordinator [get]
 Gets the Coordinator value to assign to the remote end of this transaction manager link. Must be called during link setup, i.e. before calling the open method.
 
- Properties inherited from Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< ITransactionManager >
virtual IEngine Engine [get]
 Provides access to the engine instance that owns the resources of this endpoint and its parent.
 
IAttachments Attachments [get]
 Access the attachments instance that is associated with this resource where the application can store data relevant to the endpoint for later use.
 
object LinkedResource [get, set]
 Allows the endpoint to have some user defined resource linked to it which can be used to store application state data or other associated object instances with this endpoint.
 
virtual ErrorCondition ErrorCondition [get, set]
 Provides access to the error condition that should be applied to the AMQP frame that closes or ends this endpoint when the close method is called be the user. Setting this value after closing the endpoint has no effect.
 
virtual ErrorCondition RemoteErrorCondition [get, set]
 If the remote has closed this endpoint and provided an ErrorCondition as part of the closing AMQP performative then this method will return it.
 
bool IsLocallyOpen [get]
 Returns true if the endpoint open was previously called and the close method has not yet been invoked. This only reflects the state on the local end and the user should also check the remote state.
 
bool IsLocallyClosed [get]
 Returns true if the endpoint having been previously locally opened is now closed due to a call the the close method. This does not reflect the state of the remote endpoint and that should be checked separately.
 
bool IsRemotelyOpen [get]
 Returns true if this endpoint is currently remotely open meaning that the AMQP performative that completes the open phase of this endpoint's lifetime has arrived but the performative that closes it has not.
 
bool IsRemotelyClosed [get]
 Returns true if this endpoint is currently remotely closed meaning that the AMQP performative that completes the close phase of this endpoint's lifetime has arrived.
 
Symbol[] OfferedCapabilities [get, set]
 Access the capabilities to be offered on to the remote when this endpoint is opened. The offered capabilities value can only be modified prior to a call to open, once the endpoint has been opened locally an error will be thrown if this method is called.
 
Symbol[] DesiredCapabilities [get, set]
 Access the capabilities that are desired on to the remote when this endpoint is opened. The desired capabilities value can only be modified prior to a call to open, once the endpoint has been opened locally an error will be thrown if this method is called.
 
Symbol[] RemoteOfferedCapabilities [get]
 The capabilities offered by the remote when it opened its end of the endpoint.
 
Symbol[] RemoteDesiredCapabilities [get]
 The capabilities desired by the remote when it opened its end of the endpoint.
 
IReadOnlyDictionary< Symbol, object > Properties [get, set]
 Access the properties that are conveyed to the remote when this endpoint is opened. The properties value can only be modified prior to a call to open, once the endpoint has been opened locally an error will be thrown if this method is called.
 
IReadOnlyDictionary< Symbol, object > RemoteProperties [get]
 The properties sent by the remote when it opened its end of this endpoint.
 
- Properties inherited from Apache.Qpid.Proton.Engine.ITransactionManager
- Properties inherited from Apache.Qpid.Proton.Engine.IEndpoint< ITransactionManager >
IEngine Engine [get]
 Provides access to the engine instance that owns the resources of this endpoint and its parent.
 
IAttachments Attachments [get]
 Access the attachments instance that is associated with this resource where the application can store data relevant to the endpoint for later use.
 
object LinkedResource [get, set]
 Allows the endpoint to have some user defined resource linked to it which can be used to store application state data or other associated object instances with this endpoint.
 
ErrorCondition ErrorCondition [get, set]
 Provides access to the error condition that should be applied to the AMQP frame that closes or ends this endpoint when the close method is called be the user. Setting this value after closing the endpoint has no effect.
 
ErrorCondition RemoteErrorCondition [get]
 If the remote has closed this endpoint and provided an ErrorCondition as part of the closing AMQP performative then this method will return it.
 
bool IsLocallyOpen [get]
 Returns true if the endpoint open was previously called and the close method has not yet been invoked. This only reflects the state on the local end and the user should also check the remote state.
 
bool IsLocallyClosed [get]
 Returns true if the endpoint having been previously locally opened is now closed due to a call the the close method. This does not reflect the state of the remote endpoint and that should be checked separately.
 
bool IsRemotelyOpen [get]
 Returns true if this endpoint is currently remotely open meaning that the AMQP performative that completes the open phase of this endpoint's lifetime has arrived but the performative that closes it has not.
 
bool IsRemotelyClosed [get]
 Returns true if this endpoint is currently remotely closed meaning that the AMQP performative that completes the close phase of this endpoint's lifetime has arrived.
 
Symbol[] OfferedCapabilities [get, set]
 Access the capabilities to be offered on to the remote when this endpoint is opened. The offered capabilities value can only be modified prior to a call to open, once the endpoint has been opened locally an error will be thrown if this method is called.
 
Symbol[] DesiredCapabilities [get, set]
 Access the capabilities that are desired on to the remote when this endpoint is opened. The desired capabilities value can only be modified prior to a call to open, once the endpoint has been opened locally an error will be thrown if this method is called.
 
IReadOnlyDictionary< Symbol, object > Properties [get, set]
 Access the properties that are conveyed to the remote when this endpoint is opened. The properties value can only be modified prior to a call to open, once the endpoint has been opened locally an error will be thrown if this method is called.
 
Symbol[] RemoteOfferedCapabilities [get]
 The capabilities offered by the remote when it opened its end of the endpoint.
 
Symbol[] RemoteDesiredCapabilities [get]
 The capabilities desired by the remote when it opened its end of the endpoint.
 
IReadOnlyDictionary< Symbol, object > RemoteProperties [get]
 The properties sent by the remote when it opened its end of this endpoint.
 

Additional Inherited Members

- Protected Attributes inherited from Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< ITransactionManager >
readonly ProtonEngine engine
 

Detailed Description

Proton transaction manager abstraction that provides the transaction services for a Receiver link that handles the transaction Declare and Discharge commands which control the lifetime and outcome of a running transaction.

Member Function Documentation

◆ AddCredit()

ITransactionManager Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.AddCredit ( uint  credit)
inline

Adds the given amount of credit for the transaction manager which allows the remote transaction controller to send declare and discharge requests to this manager. The remote transaction controller cannot send any requests to start or complete a transaction without having credit to do so which implies that the transaction manager owner must grant credit as part of its normal processing.

Parameters
creditThe credit to add to the current link credit
Returns
This transaction manager instance.

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ Declared() [1/2]

ITransactionManager Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.Declared ( ITransaction< ITransactionManager transaction,
byte[]  txnId 
)
inline

Respond to a previous declare request from the remote transaction controller indicating that the requested transaction has been successfully declared and that deliveries can now be enlisted in that transaction.

Parameters
transactionThe transaction instance that is being declared
txnIdThe new transaction id to assign to the transaction
Returns

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ Declared() [2/2]

ITransactionManager Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.Declared ( ITransaction< ITransactionManager transaction,
IProtonBuffer  txnId 
)
inline

Respond to a previous declare request from the remote transaction controller indicating that the requested transaction has been successfully declared and that deliveries can now be enlisted in that transaction.

Parameters
transactionThe transaction instance that is being declared
txnIdThe new transaction id to assign to the transaction
Returns
This transaction manager instance

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ DeclareFailed()

ITransactionManager Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.DeclareFailed ( ITransaction< ITransactionManager transaction,
ErrorCondition  condition 
)
inline

Respond to a previous declare request from the remote transaction controller indicating that the requested transaction declaration has failed and is not active.

Parameters
transactionThe transaction that failed to be declared
conditionThe error condition that indicates the cause of the failure
Returns
This transaction manager instance

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ DeclareHandler()

ITransactionManager Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.DeclareHandler ( Action< ITransaction< ITransactionManager > >  handler)
inline

Called when the remote transaction controller end of the link has requested a new transaction be declared using the information provided in the given declare instance.

Parameters
handlerThe delegate that will process the event
Returns
This transaction manager instance

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ Discharged()

ITransactionManager Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.Discharged ( ITransaction< ITransactionManager transaction)
inline

Respond to a previous discharge request from the remote transaction controller indicating that the discharge completed on the transaction identified by given transaction Id has now been retired.

Parameters
transactionThe transaction that was discharged
Returns
This transaction manager instance

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ DischargeFailed()

ITransactionManager Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.DischargeFailed ( ITransaction< ITransactionManager transaction,
ErrorCondition  condition 
)
inline

Respond to a previous discharge request from the remote transaction controller indicating that the discharge resulted in an error and the transaction must be considered rolled back.

Parameters
transactionThe transaction that failed to be discharged
conditionThe error condition that indicates the cause of the failure
Returns
This transaction manager instance

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ DischargeHandler()

ITransactionManager Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.DischargeHandler ( Action< ITransaction< ITransactionManager > >  handler)
inline

Called when the remote transaction controller end of the link has requested a current transaction be discharged using the information provided in the given discharge instance.

Parameters
handlerThe delegate that will process the event
Returns
This transaction manager instance

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ ParentEndpointClosedHandler()

ITransactionManager Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.ParentEndpointClosedHandler ( Action< ITransactionManager handler)
inline

Sets a Action delegate for when the parent Session or Connection of this link is locally closed. Typically used by clients for logging or other state update event processing. Clients should not perform any blocking calls within this context. It is an error for the handler to throw an exception and the outcome of doing so is undefined.

Parameters
handlerThe delegate that will handle this event
Returns
This transaction manager instance

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

Property Documentation

◆ Connection

IConnection Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.Connection
get

Provides access to the connection that owns this transaction manager endpoint.

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ Coordinator

Coordinator Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.Coordinator
getset

Access the Coordinator value to assign to the local end of this transaction manager link. Must be called during link setup, i.e. before calling the open method.

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ Credit

uint Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.Credit
get

Retrieves the current amount of link credit that is assigned to the remote for sending transaction work requests.

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ RemoteCoordinator

Coordinator Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.RemoteCoordinator
get

Gets the Coordinator value to assign to the remote end of this transaction manager link. Must be called during link setup, i.e. before calling the open method.

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ RemoteSource

Source Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.RemoteSource
get

Gets the Source value to assign to the remote end of this transaction manager link. Must be called during link setup, i.e. before calling the open method.

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ Session

ISession Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.Session
get

Provides access to the session that created this transaction manager.

Implements Apache.Qpid.Proton.Engine.ITransactionManager.

◆ Source

Source Apache.Qpid.Proton.Engine.Implementation.ProtonTransactionManager.Source
getset

Access the Source value to assign to the local end of this transaction manager link. Must be called during link setup, i.e. before calling the open method.

Implements Apache.Qpid.Proton.Engine.ITransactionManager.


The documentation for this class was generated from the following file: