Proton DotNet
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Apache.Qpid.Proton.Client.ISession Interface Reference

A single AMQP session instance. More...

Inheritance diagram for Apache.Qpid.Proton.Client.ISession:
Apache.Qpid.Proton.Client.Implementation.ClientSession Apache.Qpid.Proton.Client.Implementation.ClientStreamSession

Public Member Functions

void Close (IErrorCondition error=null)
 Initiates a close of the session and awaits a response from the remote that indicates completion of the close operation. If the response from the remote exceeds the configure close timeout the method returns after cleaning up the session resources.
 
Task< ISessionCloseAsync (IErrorCondition error=null)
 Initiates a close of the session and a Task that allows the caller to await or poll for the response from the remote that indicates completion of the close operation. If the response from the remote exceeds the configure close timeout the session will be cleaned up and the Task signalled indicating completion.
 
IReceiver OpenReceiver (string address, ReceiverOptions options=null)
 Creates a receiver used to consume messages from the given node address. The returned receiver will be configured using the provided receiver options.
 
Task< IReceiverOpenReceiverAsync (string address, ReceiverOptions options=null)
 Creates a receiver used to consume messages from the given node address. The returned Task will allow the caller to wait for the creation of the receiver configured using the provided receiver options.
 
IReceiver OpenDurableReceiver (string address, string subscriptionName, ReceiverOptions options=null)
 Creates a receiver used to consume messages from the given node address. The returned receiver will be configured using the provided receiver options.
 
Task< IReceiverOpenDurableReceiverAsync (string address, string subscriptionName, ReceiverOptions options=null)
 Creates a receiver used to consume messages from the given node address. The returned Task will allow the caller to wait for the creation of the receiver configured using the provided receiver options.
 
IReceiver OpenDynamicReceiver (ReceiverOptions options=null, IDictionary< string, object > dynamicNodeProperties=null)
 Creates a dynamic receiver used to consume messages from the dynamically generated node. on the remote. The returned receiver will be configured using the provided options.
 
Task< IReceiverOpenDynamicReceiverAsync (ReceiverOptions options=null, IDictionary< string, object > dynamicNodeProperties=null)
 Creates a dynamic receiver used to consume messages from the dynamically generated node. on the remote. The returned Task will allow the caller to wait for the creation of the receiver configured using the provided receiver options.
 
ISender OpenSender (string address, SenderOptions options=null)
 Creates a sender used to send messages to the given node address. The returned sender will be configured using configuration options provided.
 
Task< ISenderOpenSenderAsync (string address, SenderOptions options=null)
 Creates a sender used to send messages to the given node address. The returned Task will allow the caller to wait for the creation of the receiver configured using the provided receiver options.
 
ISender OpenAnonymousSender (SenderOptions options=null)
 Creates a anonymous sender used to send messages to the "anonymous relay" on the remote. Each message sent must include a "to" address for the remote to route the message. The returned sender will be configured using the provided sender options.
 
Task< ISenderOpenAnonymousSenderAsync (SenderOptions options=null)
 Creates a anonymous sender used to send messages to the "anonymous relay" on the remote. Each message sent must include a "to" address for the remote to route the message. The returned Task will allow the caller to wait for the creation of the receiver configured using the provided receiver options.
 
ISession BeginTransaction ()
 Opens a new transaction scoped to this Session if one is not already active.
 
Task< ISessionBeginTransactionAsync ()
 Opens a new transaction scoped to this Session if one is not already active. The transaction will not be considered active until the returned Task is completed.
 
ISession CommitTransaction ()
 Commit the currently active transaction in this Session.
 
Task< ISessionCommitTransactionAsync ()
 Asynchronously commit the currently active transaction in this Session, the transaction cannot be considered retired until the Task has been completed.
 
ISession RollbackTransaction ()
 Roll back the currently active transaction in this Session.
 
Task< ISessionRollbackTransactionAsync ()
 Asynchronously roll back the currently active transaction in this Session.
 
IReceiver NextReceiver ()
 Waits indefinitely for a receiver created from this session to have a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the configured value of the default next receiver policy that was configured in the session options used to create this session, or the connection level policy if none was assigned to the session options.
 
Task< IReceiverNextReceiverAsync ()
 Returns a task that will complete only after a receiver created from this session has a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the configured value of the default next receiver policy that was configured in the session options used to create this session, or the connection level policy if none was assigned to the session options.
 
IReceiver NextReceiver (NextReceiverPolicy policy)
 Waits indefinitely for a receiver created from this session to have a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the value of the next receiver policy that is provided by the caller.
 
Task< IReceiverNextReceiverAsync (NextReceiverPolicy policy)
 Returns a task that will complete only after a receiver created from this session has a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the value of the next receiver policy that is provided by the caller.
 
IReceiver NextReceiver (TimeSpan timeout)
 Waits up to the given timeout for a receiver created from this session to have a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the configured value of the default next receiver policy that was configured in the session options used to create this session, or the connection level policy if none was assigned to the session options.
 
Task< IReceiverNextReceiverAsync (TimeSpan timeout)
 Returns a task that will complete once a receiver created from this session has a delivery ready for receipt or the given timeout expires. The selection of the next receiver when more than one exists which has pending deliveries is based upon the configured value of the default next receiver policy that was configured in the session options used to create this session, or the connection level policy if none was assigned to the session options.
 
IReceiver NextReceiver (NextReceiverPolicy policy, TimeSpan timeout)
 Waits up to the given timeout for a receiver created from this session to have a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the value of the next receiver policy that is provided by the caller.
 
Task< IReceiverNextReceiverAsync (NextReceiverPolicy policy, TimeSpan timeout)
 Returns a task that will complete once a receiver created from this session has a delivery ready for receipt or the given timeout expires. The selection of the next receiver when more than one exists which has pending deliveries is based upon the value of the next receiver policy that is provided by the caller.
 

Properties

IClient Client [get]
 Returns the parent client instance that hosts this session.
 
IConnection Connection [get]
 Returns the parent connection instance that created this session.
 
Task< ISessionOpenTask [get]
 When a session is created and returned to the client application it may not be remotely opened yet and if the client needs to wait for completion of the open before proceeding the open task can be fetched and waited upon.
 
IReadOnlyDictionary< string, object > Properties [get]
 Returns the properties that the remote provided upon successfully opening the session. If the open has not completed yet this method will block to await the open response which carries the remote properties. If the remote provides no properties this method will return null.
 
IReadOnlyCollection< string > OfferedCapabilities [get]
 Returns the offered capabilities that the remote provided upon successfully opening the session. If the open has not completed yet this method will block to await the open response which carries the remote offered capabilities. If the remote provides no offered capabilities this method will return null.
 
IReadOnlyCollection< string > DesiredCapabilities [get]
 Returns the desired capabilities that the remote provided upon successfully opening the session. If the open has not completed yet this method will block to await the open response which carries the remote desired capabilities. If the remote provides no desired capabilities this method will return null.
 

Detailed Description

A single AMQP session instance.

Member Function Documentation

◆ BeginTransaction()

ISession Apache.Qpid.Proton.Client.ISession.BeginTransaction ( )

Opens a new transaction scoped to this Session if one is not already active.

A Session that has an active transaction will perform all sends and all delivery dispositions under that active transaction. If the user wishes to send with the same session but outside of a transaction they user must commit the active transaction and not request that a new one be started. A session can only have one active transaction at a time and as such any call to begin while there is a currently active transaction will throw an ClientTransactionNotActiveException to indicate that the operation being requested is not valid at that time.

This is a blocking method that will return successfully only after a new transaction has been started.

Returns
This Session instance

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ BeginTransactionAsync()

Task< ISession > Apache.Qpid.Proton.Client.ISession.BeginTransactionAsync ( )

Opens a new transaction scoped to this Session if one is not already active. The transaction will not be considered active until the returned Task is completed.

A Session that has an active transaction will perform all sends and all delivery dispositions under that active transaction. If the user wishes to send with the same session but outside of a transaction they user must commit the active transaction and not request that a new one be started. A session can only have one active transaction at a time and as such any call to begin while there is a currently active transaction will throw an ClientTransactionNotActiveException to indicate that the operation being requested is not valid at that time.

Returns
A Task whose result is the Session instance now under a transaction

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ Close()

void Apache.Qpid.Proton.Client.ISession.Close ( IErrorCondition  error = null)

Initiates a close of the session and awaits a response from the remote that indicates completion of the close operation. If the response from the remote exceeds the configure close timeout the method returns after cleaning up the session resources.

Parameters
errorOptional error condition to convey to the remote

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ CloseAsync()

Task< ISession > Apache.Qpid.Proton.Client.ISession.CloseAsync ( IErrorCondition  error = null)

Initiates a close of the session and a Task that allows the caller to await or poll for the response from the remote that indicates completion of the close operation. If the response from the remote exceeds the configure close timeout the session will be cleaned up and the Task signalled indicating completion.

Parameters
errorOptional error condition to convey to the remote

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ CommitTransaction()

ISession Apache.Qpid.Proton.Client.ISession.CommitTransaction ( )

Commit the currently active transaction in this Session.

Commit the currently active transaction in this Session but does not start a new transaction automatically. If there is no current transaction this method will throw an ClientTransactionNotActiveException to indicate this error. If the active transaction has entered an in doubt state or was remotely rolled back this method will throw an error to indicate that the commit failed and that a new transaction need to be started by the user. When a transaction rolled back error occurs the user should assume that all work performed under that transaction has failed and will need to be attempted under a new transaction.

This is a blocking method that will return successfully only after the transaction has been committed.

Returns
This Session instance

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ CommitTransactionAsync()

Task< ISession > Apache.Qpid.Proton.Client.ISession.CommitTransactionAsync ( )

Asynchronously commit the currently active transaction in this Session, the transaction cannot be considered retired until the Task has been completed.

Commit the currently active transaction in this Session but does not start a new transaction automatically. If there is no current transaction this method fails the returned Task with an ClientTransactionNotActiveException to indicate this error. If the active transaction has entered an in doubt state or was remotely rolled back this method fail the Task with an error to indicate that the commit failed and that a new transaction need to be started by the user. When a transaction rolled back error occurs the user should assume that all work performed under that transaction has failed and will need to be attempted under a new transaction.

Returns
A Task whose result is the Session no longer under a transaction

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ NextReceiver() [1/4]

IReceiver Apache.Qpid.Proton.Client.ISession.NextReceiver ( )

Waits indefinitely for a receiver created from this session to have a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the configured value of the default next receiver policy that was configured in the session options used to create this session, or the connection level policy if none was assigned to the session options.

Returns
The next receiver that has a pending delivery available based on policy.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ NextReceiver() [2/4]

IReceiver Apache.Qpid.Proton.Client.ISession.NextReceiver ( NextReceiverPolicy  policy)

Waits indefinitely for a receiver created from this session to have a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the value of the next receiver policy that is provided by the caller.

Parameters
policyThe next receiver policy to apply when selecting a result
Returns

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ NextReceiver() [3/4]

IReceiver Apache.Qpid.Proton.Client.ISession.NextReceiver ( NextReceiverPolicy  policy,
TimeSpan  timeout 
)

Waits up to the given timeout for a receiver created from this session to have a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the value of the next receiver policy that is provided by the caller.

Parameters
policyThe next receiver policy to apply when selecting a result
timeoutThe time to wait for a receiver to have a pending delivery
Returns
A Task that results in the next receiver that has a pending delivery available based on policy.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ NextReceiver() [4/4]

IReceiver Apache.Qpid.Proton.Client.ISession.NextReceiver ( TimeSpan  timeout)

Waits up to the given timeout for a receiver created from this session to have a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the configured value of the default next receiver policy that was configured in the session options used to create this session, or the connection level policy if none was assigned to the session options.

Parameters
timeoutThe time to wait for a receiver to have a pending delivery
Returns

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ NextReceiverAsync() [1/4]

Task< IReceiver > Apache.Qpid.Proton.Client.ISession.NextReceiverAsync ( )

Returns a task that will complete only after a receiver created from this session has a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the configured value of the default next receiver policy that was configured in the session options used to create this session, or the connection level policy if none was assigned to the session options.

Returns
A Task that results in the next receiver that has a pending delivery available based on policy.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ NextReceiverAsync() [2/4]

Task< IReceiver > Apache.Qpid.Proton.Client.ISession.NextReceiverAsync ( NextReceiverPolicy  policy)

Returns a task that will complete only after a receiver created from this session has a delivery ready for receipt. The selection of the next receiver when more than one exists which has pending deliveries is based upon the value of the next receiver policy that is provided by the caller.

Parameters
policyThe next receiver policy to apply when selecting a result
Returns
A Task that results in the next receiver that has a pending delivery available based on policy.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ NextReceiverAsync() [3/4]

Task< IReceiver > Apache.Qpid.Proton.Client.ISession.NextReceiverAsync ( NextReceiverPolicy  policy,
TimeSpan  timeout 
)

Returns a task that will complete once a receiver created from this session has a delivery ready for receipt or the given timeout expires. The selection of the next receiver when more than one exists which has pending deliveries is based upon the value of the next receiver policy that is provided by the caller.

Parameters
policyThe next receiver policy to apply when selecting a result
timeoutThe time to wait for a receiver to have a pending delivery
Returns
A Task that results in the next receiver that has a pending delivery available based on policy.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ NextReceiverAsync() [4/4]

Task< IReceiver > Apache.Qpid.Proton.Client.ISession.NextReceiverAsync ( TimeSpan  timeout)

Returns a task that will complete once a receiver created from this session has a delivery ready for receipt or the given timeout expires. The selection of the next receiver when more than one exists which has pending deliveries is based upon the configured value of the default next receiver policy that was configured in the session options used to create this session, or the connection level policy if none was assigned to the session options.

Parameters
timeoutThe time to wait for a receiver to have a pending delivery
Returns

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ OpenAnonymousSender()

ISender Apache.Qpid.Proton.Client.ISession.OpenAnonymousSender ( SenderOptions  options = null)

Creates a anonymous sender used to send messages to the "anonymous relay" on the remote. Each message sent must include a "to" address for the remote to route the message. The returned sender will be configured using the provided sender options.

The returned sender may not have been opened on the remote when it is returned. Some methods of the sender can block until the remote fully opens the sender, the user can wait for the remote to respond to the open request by obtaining the open task from the sender and using it to await the completion of the sender open.

Parameters
optionsOptional sender options to use for configuration
Returns
A new sender instance.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ OpenAnonymousSenderAsync()

Task< ISender > Apache.Qpid.Proton.Client.ISession.OpenAnonymousSenderAsync ( SenderOptions  options = null)

Creates a anonymous sender used to send messages to the "anonymous relay" on the remote. Each message sent must include a "to" address for the remote to route the message. The returned Task will allow the caller to wait for the creation of the receiver configured using the provided receiver options.

The returned sender may not have been opened on the remote when it is returned. Some methods of the sender can block until the remote fully opens the sender, the user can wait for the remote to respond to the open request by obtaining the open task from the sender and using it to await the completion of the sender open.

Parameters
optionsOptional sender options to use for configuration
Returns
A new Task<ISender> instance.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ OpenDurableReceiver()

IReceiver Apache.Qpid.Proton.Client.ISession.OpenDurableReceiver ( string  address,
string  subscriptionName,
ReceiverOptions  options = null 
)

Creates a receiver used to consume messages from the given node address. The returned receiver will be configured using the provided receiver options.

The returned receiver may not have been opened on the remote when it is returned. Some methods of the receiver can block until the remote fully opens the receiver, the user can wait for the remote to respond to the open request by obtaining the open task from the receiver and using it to await the completion of the receiver open.

Parameters
addressThe address of the node the receiver attaches to
subscriptionNameThe subscription name to use for the receiver
optionsOptional receiver options to use for configuration
Returns
A new receiver instance

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ OpenDurableReceiverAsync()

Task< IReceiver > Apache.Qpid.Proton.Client.ISession.OpenDurableReceiverAsync ( string  address,
string  subscriptionName,
ReceiverOptions  options = null 
)

Creates a receiver used to consume messages from the given node address. The returned Task will allow the caller to wait for the creation of the receiver configured using the provided receiver options.

The returned receiver may not have been opened on the remote when it is returned. Some methods of the receiver can block until the remote fully opens the receiver, the user can wait for the remote to respond to the open request by obtaining the open task from the receiver and using it to await the completion of the receiver open.

Parameters
addressThe address of the node the receiver attaches to
subscriptionNameThe subscription name to use for the receiver
optionsOptional receiver options to use for configuration
Returns
A new Task<Receiver> instance that can be awaited

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ OpenDynamicReceiver()

IReceiver Apache.Qpid.Proton.Client.ISession.OpenDynamicReceiver ( ReceiverOptions  options = null,
IDictionary< string, object >  dynamicNodeProperties = null 
)

Creates a dynamic receiver used to consume messages from the dynamically generated node. on the remote. The returned receiver will be configured using the provided options.

The returned receiver may not have been opened on the remote when it is returned. Some methods of the receiver can block until the remote fully opens the receiver, the user can wait for the remote to respond to the open request by obtaining the open task from the receiver and using it to await the completion of the receiver open.

Parameters
optionsOptional receiver options to use for configuration
dynamicNodePropertiesOptional properties to assign to the node create
Returns
A new receiver instance

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ OpenDynamicReceiverAsync()

Task< IReceiver > Apache.Qpid.Proton.Client.ISession.OpenDynamicReceiverAsync ( ReceiverOptions  options = null,
IDictionary< string, object >  dynamicNodeProperties = null 
)

Creates a dynamic receiver used to consume messages from the dynamically generated node. on the remote. The returned Task will allow the caller to wait for the creation of the receiver configured using the provided receiver options.

The returned receiver may not have been opened on the remote when it is returned. Some methods of the receiver can block until the remote fully opens the receiver, the user can wait for the remote to respond to the open request by obtaining the open task from the receiver and using it to await the completion of the receiver open.

Parameters
optionsOptional receiver options to use for configuration
dynamicNodePropertiesOptional properties to assign to the node create
Returns
A new Task<Receiver> instance that can be awaited

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ OpenReceiver()

IReceiver Apache.Qpid.Proton.Client.ISession.OpenReceiver ( string  address,
ReceiverOptions  options = null 
)

Creates a receiver used to consume messages from the given node address. The returned receiver will be configured using the provided receiver options.

The returned receiver may not have been opened on the remote when it is returned. Some methods of the receiver can block until the remote fully opens the receiver, the user can wait for the remote to respond to the open request by obtaining the open task from the receiver and using it to await the completion of the receiver open.

Parameters
addressThe address of the node the receiver attaches to
optionsOptional receiver options to use for configuration
Returns
A new receiver instance

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ OpenReceiverAsync()

Task< IReceiver > Apache.Qpid.Proton.Client.ISession.OpenReceiverAsync ( string  address,
ReceiverOptions  options = null 
)

Creates a receiver used to consume messages from the given node address. The returned Task will allow the caller to wait for the creation of the receiver configured using the provided receiver options.

The returned receiver may not have been opened on the remote when it is returned. Some methods of the receiver can block until the remote fully opens the receiver, the user can wait for the remote to respond to the open request by obtaining the open task from the receiver and using it to await the completion of the receiver open.

Parameters
addressThe address of the node the receiver attaches to
optionsOptional receiver options to use for configuration
Returns
A new Task<Receiver> instance that can be awaited

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ OpenSender()

ISender Apache.Qpid.Proton.Client.ISession.OpenSender ( string  address,
SenderOptions  options = null 
)

Creates a sender used to send messages to the given node address. The returned sender will be configured using configuration options provided.

The returned sender may not have been opened on the remote when it is returned. Some methods of the sender can block until the remote fully opens the sender, the user can wait for the remote to respond to the open request by obtaining the open task from the sender and using it to await the completion of the sender open.

Parameters
addressThe address of the node the sender attaches to
optionsOptional sender options to use for configuration
Returns
A new sender instance.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ OpenSenderAsync()

Task< ISender > Apache.Qpid.Proton.Client.ISession.OpenSenderAsync ( string  address,
SenderOptions  options = null 
)

Creates a sender used to send messages to the given node address. The returned Task will allow the caller to wait for the creation of the receiver configured using the provided receiver options.

The returned sender may not have been opened on the remote when it is returned. Some methods of the sender can block until the remote fully opens the sender, the user can wait for the remote to respond to the open request by obtaining the open task from the sender and using it to await the completion of the sender open.

Parameters
addressThe address of the node the sender attaches to
optionsOptional sender options to use for configuration
Returns
A new Task<ISender> instance.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession, and Apache.Qpid.Proton.Client.Implementation.ClientStreamSession.

◆ RollbackTransaction()

ISession Apache.Qpid.Proton.Client.ISession.RollbackTransaction ( )

Roll back the currently active transaction in this Session.

Roll back the currently active transaction in this Session but does not automatically start a new transaction. If there is no current transaction this method will throw an ClientTransactionNotActiveException to indicate this error. If the active transaction has entered an in doubt state or was remotely rolled back this method will throw an error to indicate that the roll back failed and that a new transaction need to be started by the user.

This is a blocking method that will return successfully only after the transaction has been rolled back.

Returns
This Session instance

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ RollbackTransactionAsync()

Task< ISession > Apache.Qpid.Proton.Client.ISession.RollbackTransactionAsync ( )

Asynchronously roll back the currently active transaction in this Session.

Roll back the currently active transaction in this Session but does not automatically start a new transaction. If there is no current transaction this method fails the returned Task an ClientTransactionNotActiveException to indicate this error. If the active transaction has entered an in doubt state or was remotely rolled back this method will fail the returned Task with an error to indicate that the roll back failed and that a new transaction need to be started by the user.

Returns
A Task whose result is the Session no longer under a transaction

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

Property Documentation

◆ Client

IClient Apache.Qpid.Proton.Client.ISession.Client
get

Returns the parent client instance that hosts this session.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ Connection

IConnection Apache.Qpid.Proton.Client.ISession.Connection
get

Returns the parent connection instance that created this session.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ DesiredCapabilities

IReadOnlyCollection<string> Apache.Qpid.Proton.Client.ISession.DesiredCapabilities
get

Returns the desired capabilities that the remote provided upon successfully opening the session. If the open has not completed yet this method will block to await the open response which carries the remote desired capabilities. If the remote provides no desired capabilities this method will return null.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ OfferedCapabilities

IReadOnlyCollection<string> Apache.Qpid.Proton.Client.ISession.OfferedCapabilities
get

Returns the offered capabilities that the remote provided upon successfully opening the session. If the open has not completed yet this method will block to await the open response which carries the remote offered capabilities. If the remote provides no offered capabilities this method will return null.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ OpenTask

Task<ISession> Apache.Qpid.Proton.Client.ISession.OpenTask
get

When a session is created and returned to the client application it may not be remotely opened yet and if the client needs to wait for completion of the open before proceeding the open task can be fetched and waited upon.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.

◆ Properties

IReadOnlyDictionary<string, object> Apache.Qpid.Proton.Client.ISession.Properties
get

Returns the properties that the remote provided upon successfully opening the session. If the open has not completed yet this method will block to await the open response which carries the remote properties. If the remote provides no properties this method will return null.

Implemented in Apache.Qpid.Proton.Client.Implementation.ClientSession.


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