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

Implements the mechanics of managing a single AMQP session associated with the provided connection instance. More...

Inheritance diagram for Apache.Qpid.Proton.Engine.Implementation.ProtonSession:
Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< ISession > Apache.Qpid.Proton.Engine.ISession Apache.Qpid.Proton.Engine.IEndpoint< ISession >

Public Member Functions

 ProtonSession (ProtonConnection connection, ushort channel)
 
override ProtonSession Open ()
 
override ProtonSession Close ()
 
ISender Sender (string name)
 Create a new sender link using the provided name.
 
IReceiver Receiver (string name)
 Create a new receiver link using the provided name.
 
ITransactionController Coordinator (string name)
 Create a new transaction controller link using the provided name.
 
ISession ReceiverOpenHandler (Action< IReceiver > handler)
 Sets a delegate for when an AMQP Attach frame is received from the remote peer for a sending link attach. Used to process remotely initiated sending link. Locally initiated links have their own handlers invoked instead. This method is Typically used by servers to listen for remote receiver creation. If an event handler for remote sender open is registered on this Session for a link scoped to it then this handler will be invoked instead of the variant in the Connection API.
 
ISession SenderOpenHandler (Action< ISender > handler)
 Sets a delegate for when an AMQP Attach frame is received from the remote peer for a receiving link attach. Used to process remotely initiated receiving link. Locally initiated links have their own handlers invoked instead. This method is Typically used by servers to listen for remote sender creation. If an event handler for remote sender open is registered on this Session for a link scoped to it then this handler will be invoked instead of the variant in the Connection API.
 
ISession TransactionManagerOpenedHandler (Action< ITransactionManager > handler)
 Sets a delegate for when an AMQP Attach frame is received from the remote peer for a transaction manager link attach. Used to process remotely initiated transaction managers. Locally initiated links have their own handlers invoked instead. This method is Typically used by servers to listen for remote resource creation. If an event handler for remote sender open is registered on this Session for a link scoped to it then this handler will be invoked instead of the variant in the Connection API.
 
ISession DeliveryReadHandler (Action< IIncomingDelivery > handler)
 Allows monitoring of incoming deliveries to receivers attached to this Session. The Receiver that is the target of the incoming delivery will be notified first of the incoming delivery and any processing should be done using the Receiver DeliveryReadHandler API. This event point will be trigger only after the Receiver level handler and should be used to monitor deliveries passing through a session for logging or other state related actions performed by the service managing this session.
 
- Public Member Functions inherited from Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< ISession >
 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< ISession >
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 session endpoint.
 
ushort LocalChannel [get]
 
ushort RemoteChannel [get]
 
SessionState State [get]
 Access the session state for the local end of the session.
 
SessionState RemoteState [get]
 Access the session state for the remote end of the session.
 
override bool IsLocallyOpen [get]
 
override bool IsLocallyClosed [get]
 
override bool IsRemotelyOpen [get]
 
override bool IsRemotelyClosed [get]
 
uint IncomingCapacity [get, set]
 Sets the maximum number of bytes this session can be sent from the remote.
 
uint RemainingIncomingCapacity [get]
 The remaining session incoming capacity based on how many bytes are currently pending,.
 
uint OutgoingCapacity [get, set]
 Sets the maximum number of bytes this session can have written write before blocking additional sends until the written bytes are known to have been flushed to the I/O. This limit is intended to deal with issues of memory allocation when the I/O layer allows for asynchronous writes and finer grained control over the pending write buffers is needed.
 
uint RemainingOutgoingCapacity [get]
 The remaining session outgoing capacity based on how many bytes are currently pending,.
 
uint HandleMax [get, set]
 Set the handle max value for this Session which is the highest possible link handle that can be open at one time before new attach request are rejected. The handle max value can only be modified prior to a call to session open, once the session has been opened locally an error will be thrown if this method is called.
 
uint RemoteHandleMax [get]
 Gets the remote handle max to determine how many links could be attached before the remote will refuse incoming attach requests.
 
override Symbol[] OfferedCapabilities [get, set]
 
override Symbol[] DesiredCapabilities [get, set]
 
override Symbol[] RemoteOfferedCapabilities [get]
 
override Symbol[] RemoteDesiredCapabilities [get]
 
override IReadOnlyDictionary< Symbol, object > Properties [get, set]
 
override IReadOnlyDictionary< Symbol, object > RemoteProperties [get]
 
IEnumerable< IReceiverReceivers [get]
 Returns an enumerator of all the receivers currently tracked by this session.
 
IEnumerable< ISenderSenders [get]
 Returns an enumerator of all the senders currently tracked by this session.
 
- Properties inherited from Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< ISession >
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.ISession
- Properties inherited from Apache.Qpid.Proton.Engine.IEndpoint< ISession >
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< ISession >
readonly ProtonEngine engine
 

Detailed Description

Implements the mechanics of managing a single AMQP session associated with the provided connection instance.

Member Function Documentation

◆ Coordinator()

ITransactionController Apache.Qpid.Proton.Engine.Implementation.ProtonSession.Coordinator ( string  name)
inline

Create a new transaction controller link using the provided name.

Parameters
nameThe link name to assign the new sender
Returns
The newly created transaction controller
Exceptions
InvalidOperationExceptionIf the session is closed"

Implements Apache.Qpid.Proton.Engine.ISession.

◆ DeliveryReadHandler()

ISession Apache.Qpid.Proton.Engine.Implementation.ProtonSession.DeliveryReadHandler ( Action< IIncomingDelivery handler)
inline

Allows monitoring of incoming deliveries to receivers attached to this Session. The Receiver that is the target of the incoming delivery will be notified first of the incoming delivery and any processing should be done using the Receiver DeliveryReadHandler API. This event point will be trigger only after the Receiver level handler and should be used to monitor deliveries passing through a session for logging or other state related actions performed by the service managing this session.

Parameters
handlerHandler that is signalled that a receiver read a new delivery
Returns
This session instance

Implements Apache.Qpid.Proton.Engine.ISession.

◆ Receiver()

IReceiver Apache.Qpid.Proton.Engine.Implementation.ProtonSession.Receiver ( string  name)
inline

Create a new receiver link using the provided name.

Parameters
nameThe link name to assign the new sender
Returns
The newly created receiver instance
Exceptions
InvalidOperationExceptionIf the session is closed"

Implements Apache.Qpid.Proton.Engine.ISession.

◆ ReceiverOpenHandler()

ISession Apache.Qpid.Proton.Engine.Implementation.ProtonSession.ReceiverOpenHandler ( Action< IReceiver handler)
inline

Sets a delegate for when an AMQP Attach frame is received from the remote peer for a sending link attach. Used to process remotely initiated sending link. Locally initiated links have their own handlers invoked instead. This method is Typically used by servers to listen for remote receiver creation. If an event handler for remote sender open is registered on this Session for a link scoped to it then this handler will be invoked instead of the variant in the Connection API.

Parameters
handlerThe delegate that will handle this event
Returns
This session instance

Implements Apache.Qpid.Proton.Engine.ISession.

◆ Sender()

ISender Apache.Qpid.Proton.Engine.Implementation.ProtonSession.Sender ( string  name)
inline

Create a new sender link using the provided name.

Parameters
nameThe link name to assign the new sender
Returns
The newly created sender instance
Exceptions
InvalidOperationExceptionIf the session is closed"

Implements Apache.Qpid.Proton.Engine.ISession.

◆ SenderOpenHandler()

ISession Apache.Qpid.Proton.Engine.Implementation.ProtonSession.SenderOpenHandler ( Action< ISender handler)
inline

Sets a delegate for when an AMQP Attach frame is received from the remote peer for a receiving link attach. Used to process remotely initiated receiving link. Locally initiated links have their own handlers invoked instead. This method is Typically used by servers to listen for remote sender creation. If an event handler for remote sender open is registered on this Session for a link scoped to it then this handler will be invoked instead of the variant in the Connection API.

Parameters
handlerThe delegate that will handle this event
Returns
This session instance

Implements Apache.Qpid.Proton.Engine.ISession.

◆ TransactionManagerOpenedHandler()

ISession Apache.Qpid.Proton.Engine.Implementation.ProtonSession.TransactionManagerOpenedHandler ( Action< ITransactionManager handler)
inline

Sets a delegate for when an AMQP Attach frame is received from the remote peer for a transaction manager link attach. Used to process remotely initiated transaction managers. Locally initiated links have their own handlers invoked instead. This method is Typically used by servers to listen for remote resource creation. If an event handler for remote sender open is registered on this Session for a link scoped to it then this handler will be invoked instead of the variant in the Connection API.

Parameters
handlerThe delegate that will handle this event
Returns
This session instance

Implements Apache.Qpid.Proton.Engine.ISession.

Property Documentation

◆ Connection

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

Provides access to the connection that owns this session endpoint.

Implements Apache.Qpid.Proton.Engine.ISession.

◆ HandleMax

uint Apache.Qpid.Proton.Engine.Implementation.ProtonSession.HandleMax
getset

Set the handle max value for this Session which is the highest possible link handle that can be open at one time before new attach request are rejected. The handle max value can only be modified prior to a call to session open, once the session has been opened locally an error will be thrown if this method is called.

Implements Apache.Qpid.Proton.Engine.ISession.

◆ IncomingCapacity

uint Apache.Qpid.Proton.Engine.Implementation.ProtonSession.IncomingCapacity
getset

Sets the maximum number of bytes this session can be sent from the remote.

Implements Apache.Qpid.Proton.Engine.ISession.

◆ OutgoingCapacity

uint Apache.Qpid.Proton.Engine.Implementation.ProtonSession.OutgoingCapacity
getset

Sets the maximum number of bytes this session can have written write before blocking additional sends until the written bytes are known to have been flushed to the I/O. This limit is intended to deal with issues of memory allocation when the I/O layer allows for asynchronous writes and finer grained control over the pending write buffers is needed.

Implements Apache.Qpid.Proton.Engine.ISession.

◆ Receivers

IEnumerable<IReceiver> Apache.Qpid.Proton.Engine.Implementation.ProtonSession.Receivers
get

Returns an enumerator of all the receivers currently tracked by this session.

Implements Apache.Qpid.Proton.Engine.ISession.

◆ RemainingIncomingCapacity

uint Apache.Qpid.Proton.Engine.Implementation.ProtonSession.RemainingIncomingCapacity
get

The remaining session incoming capacity based on how many bytes are currently pending,.

Implements Apache.Qpid.Proton.Engine.ISession.

◆ RemainingOutgoingCapacity

uint Apache.Qpid.Proton.Engine.Implementation.ProtonSession.RemainingOutgoingCapacity
get

The remaining session outgoing capacity based on how many bytes are currently pending,.

Implements Apache.Qpid.Proton.Engine.ISession.

◆ RemoteHandleMax

uint Apache.Qpid.Proton.Engine.Implementation.ProtonSession.RemoteHandleMax
get

Gets the remote handle max to determine how many links could be attached before the remote will refuse incoming attach requests.

Implements Apache.Qpid.Proton.Engine.ISession.

◆ RemoteState

SessionState Apache.Qpid.Proton.Engine.Implementation.ProtonSession.RemoteState
get

Access the session state for the remote end of the session.

Implements Apache.Qpid.Proton.Engine.ISession.

◆ Senders

IEnumerable<ISender> Apache.Qpid.Proton.Engine.Implementation.ProtonSession.Senders
get

Returns an enumerator of all the senders currently tracked by this session.

Implements Apache.Qpid.Proton.Engine.ISession.

◆ State

SessionState Apache.Qpid.Proton.Engine.Implementation.ProtonSession.State
get

Access the session state for the local end of the session.

Implements Apache.Qpid.Proton.Engine.ISession.


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