Proton DotNet
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
Apache.Qpid.Proton.Engine.Implementation.ProtonLink< T > Class Template Referenceabstract

Common base for Sender and Receiver links which provides services that both endpoints require that are the same between them. More...

Inheritance diagram for Apache.Qpid.Proton.Engine.Implementation.ProtonLink< T >:
Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< T > Apache.Qpid.Proton.Engine.ILink< T > Apache.Qpid.Proton.Engine.IEndpoint< T > Apache.Qpid.Proton.Engine.IEndpoint< T >

Public Member Functions

override T 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. More...
 
Detach ()
 Detaches the local end of the link if not already closed or detached. More...
 
override T 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. More...
 
DetachHandler (Action< T > handler)
 Sets a EventHandler for when an AMQP detach frame is received from the remote peer. This is a convenience event that supplements the normal link closed event point if set. If no detached event handler is set the endpoint will route the detached event to the closed event handler if set and allow it to process the event in one location. More...
 
LocalDetachHandler (Action< T > handler)
 Sets a Action for when an this endpoint is closed locally via a call to Close. This is a convenience event that supplements the normal locally closed event point if set. If no local detached event handler is set the endpoint will route the detached event to the local closed event handler if set and allow it to process the event in one location. 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. More...
 
ParentEndpointClosedHandler (Action< T > 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. More...
 
CreditStateUpdateHandler (Action< T > handler)
 Handler for link credit updates that occur after a remote flow frame arrives. More...
 
- Public Member Functions inherited from Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< T >
 ProtonEndpoint (ProtonEngine engine)
 Creates a new instance of this endpoint implementation which is owned by the provided engine instance. More...
 
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. More...
 
CloseHandler (Action< T > closeHandler)
 Sets a EventHandler for when an AMQP closing frame is received from the remote peer. More...
 
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. More...
 
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. More...
 
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. More...
 

Protected Member Functions

 ProtonLink (ProtonSession session, string name, ProtonLinkCreditState creditState)
 
abstract void HandleRemoteAttach (Attach attach)
 
abstract void HandleRemoteDetach (Detach detach)
 
abstract void HandleRemoteFlow (Flow flow)
 
abstract void HandleRemoteDisposition (Disposition disposition, ProtonOutgoingDelivery delivery)
 
abstract void HandleRemoteDisposition (Disposition disposition, ProtonIncomingDelivery delivery)
 
abstract void HandleRemoteTransfer (Transfer transfer, IProtonBuffer payload, out ProtonIncomingDelivery delivery)
 
abstract void HandleDecorateOfOutgoingFlow (Flow flow)
 
abstract void HandleSessionCreditStateUpdates (in ProtonSessionOutgoingWindow window)
 
abstract void HandleSessionCreditStateUpdates (in ProtonSessionIncomingWindow window)
 
virtual void TransitionedToLocallyOpened ()
 
virtual void TransitionedToLocallyDetached ()
 
virtual void TransitionedToLocallyClosed ()
 
virtual void TransitionToRemotelyOpenedState ()
 
virtual void TransitionToRemotelyDetached ()
 
virtual void TransitionToRemotelyClosed ()
 
virtual void TransitionToParentLocallyClosed ()
 
virtual void TransitionToParentRemotelyClosed ()
 
void CheckLinkOperable (string failurePrefix)
 
bool AreDeliveriesStillActive ()
 
void CheckNotOpened (string errorMessage)
 
void CheckNotClosed (string errorMessage)
 
void TrySyncLocalStateWithRemote ()
 

Protected Attributes

readonly ProtonConnection connection
 
readonly ProtonSession session
 
readonly Attach localAttach = new()
 
Attach remoteAttach
 
- Protected Attributes inherited from Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< T >
readonly ProtonEngine engine
 

Properties

virtual IConnection Connection [get]
 
virtual ISession Session [get]
 
bool IsSender [get]
 
bool IsReceiver [get]
 
uint Handle [get]
 
string Name [get]
 
LinkState LinkState [get]
 
LinkState RemoteState [get]
 
SenderSettleMode SenderSettleMode [get, set]
 
SenderSettleMode RemoteSenderSettleMode [get]
 
ReceiverSettleMode ReceiverSettleMode [get, set]
 
ReceiverSettleMode RemoteReceiverSettleMode [get]
 
Source Source [get, set]
 
Source RemoteSource [get]
 
ITerminus Terminus [get, set]
 
Coordinator Coordinator [get, set]
 
Target Target [get, set]
 
ITerminus RemoteTerminus [get]
 
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]
 
ulong MaxMessageSize [get, set]
 
override bool IsLocallyOpen [get]
 
override bool IsLocallyClosed [get]
 
override bool IsRemotelyOpen [get]
 
override bool IsRemotelyClosed [get]
 
bool IsLocallyDetached [get]
 
bool IsLocallyClosedOrDetached [get]
 
bool IsRemotelyDetached [get]
 
bool IsRemotelyClosedOrDetached [get]
 
abstract uint Credit [get]
 
abstract bool IsDraining [get]
 
abstract Role Role [get]
 
ProtonLinkCreditState CreditState [get]
 
bool WasLocalAttachSent [get]
 
bool WasLocalDetachSent [get]
 
- Properties inherited from Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< T >
virtual IEngine Engine [get]
 
IAttachments Attachments [get]
 
object LinkedResource [get, set]
 
virtual ErrorCondition ErrorCondition [get, set]
 
virtual ErrorCondition RemoteErrorCondition [get, set]
 
abstract bool IsLocallyOpen [get]
 
abstract bool IsLocallyClosed [get]
 
abstract bool IsRemotelyOpen [get]
 
abstract bool IsRemotelyClosed [get]
 
abstract Symbol[] OfferedCapabilities [get, set]
 
abstract Symbol[] DesiredCapabilities [get, set]
 
abstract Symbol[] RemoteOfferedCapabilities [get]
 
abstract Symbol[] RemoteDesiredCapabilities [get]
 
abstract IReadOnlyDictionary< Symbol, object > Properties [get, set]
 
abstract IReadOnlyDictionary< Symbol, object > RemoteProperties [get]
 
- Properties inherited from Apache.Qpid.Proton.Engine.IEndpoint< T >
IEngine Engine [get]
 Provides access to the engine instance that owns the resources of this endpoint and its parent. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
Symbol[] RemoteOfferedCapabilities [get]
 The capabilities offered by the remote when it opened its end of the endpoint. More...
 
Symbol[] RemoteDesiredCapabilities [get]
 The capabilities desired by the remote when it opened its end of the endpoint. More...
 
IReadOnlyDictionary< Symbol, object > RemoteProperties [get]
 The properties sent by the remote when it opened its end of this endpoint. More...
 

Detailed Description

Common base for Sender and Receiver links which provides services that both endpoints require that are the same between them.

Type Constraints
T :ILink<T> 

Member Function Documentation

◆ 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.

Returns
This endpoint instance.
Exceptions
EngineStateExceptionIf the engine state is already failed or shutdown

Implements Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< T >.

◆ CreditStateUpdateHandler()

T Apache.Qpid.Proton.Engine.Implementation.ProtonLink< T >.CreditStateUpdateHandler ( Action< T >  handler)
inline

Handler for link credit updates that occur after a remote flow frame arrives.

Parameters
handlerThe handler to invoke when the event occurs
Returns
This Endpoint instance.

Implements Apache.Qpid.Proton.Engine.ILink< T >.

◆ Detach()

Detaches the local end of the link if not already closed or detached.

Returns
This link instance.
Exceptions
EngineStateExceptionIf the engine state is already failed or shutdown

Implements Apache.Qpid.Proton.Engine.ILink< T >.

◆ DetachHandler()

T Apache.Qpid.Proton.Engine.Implementation.ProtonLink< T >.DetachHandler ( Action< T >  detachHandler)
inline

Sets a EventHandler for when an AMQP detach frame is received from the remote peer. This is a convenience event that supplements the normal link closed event point if set. If no detached event handler is set the endpoint will route the detached event to the closed event handler if set and allow it to process the event in one location.

Parameters
detachHandlerThe handler to invoke when the event occurs
Returns
This Endpoint instance.

Implements Apache.Qpid.Proton.Engine.ILink< T >.

◆ LocalDetachHandler()

T Apache.Qpid.Proton.Engine.Implementation.ProtonLink< T >.LocalDetachHandler ( Action< T >  localDetachHandler)
inline

Sets a Action for when an this endpoint is closed locally via a call to Close. This is a convenience event that supplements the normal locally closed event point if set. If no local detached event handler is set the endpoint will route the detached event to the local closed event handler if set and allow it to process the event in one location. 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
localCloseHandlerThe handler to invoke when the event occurs
Returns
This Endpoint instance.

Implements Apache.Qpid.Proton.Engine.ILink< T >.

◆ Open()

override T Apache.Qpid.Proton.Engine.Implementation.ProtonLink< T >.Open ( )
inlinevirtual

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.

Returns
This endpoint instance.
Exceptions
EngineStateExceptionIf the engine state is already failed or shutdown

Implements Apache.Qpid.Proton.Engine.Implementation.ProtonEndpoint< T >.

◆ ParentEndpointClosedHandler()

T Apache.Qpid.Proton.Engine.Implementation.ProtonLink< T >.ParentEndpointClosedHandler ( Action< T >  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 handler to invoke when the event occurs
Returns
This Endpoint instance.

Implements Apache.Qpid.Proton.Engine.ILink< T >.


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