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

Wrapper around the internal ProtonEnginePipeline used to present a guarded pipeline to the outside world when the Engine::pipeline method is used to gain access to the pipeline. The proxy will ensure that any read or write calls enforce Engine state such as not started and shutdown. More...

Inheritance diagram for Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy:
Apache.Qpid.Proton.Engine.IEnginePipeline

Public Member Functions

 ProtonEnginePipelineProxy (ProtonEnginePipeline pipeline)
 
IEnginePipeline AddFirst (string name, IEngineHandler handler)
 Adds the given handler to the front of the pipeline with the given name stored for later lookup or remove operations. It is not mandatory that each handler have unique names although if handlers do share a name the remove method will only remove them one at a time starting from the first in the pipeline.
 
IEnginePipeline AddLast (string name, IEngineHandler handler)
 Adds the given handler to the end of the pipeline with the given name stored for later lookup or remove operations. It is not mandatory that each handler have unique names although if handlers do share a name the remove method will only remove them one at a time starting from the first in the pipeline.
 
IEnginePipeline RemoveFirst ()
 Removes the first handler in the pipeline.
 
IEnginePipeline RemoveLast ()
 Removes the first handler in the pipeline.
 
IEnginePipeline Remove (string name)
 Removes the first handler in the pipeline that is assigned the given name.
 
IEnginePipeline Remove (IEngineHandler handler)
 Removes the given handler if found in the pipeline.
 
IEngineHandler Find (string name)
 Finds and returns first handler that is found in the pipeline that matches the given name.
 
IEngineHandler First ()
 Finds and returns first handler in the pipeline.
 
IEngineHandler Last ()
 Finds and returns last handler in the pipeline.
 
IEngineHandlerContext FirstContext ()
 Returns a reference to the first engine handler context in the pipeline.
 
IEngineHandlerContext LastContext ()
 Returns a reference to the last engine handler context in the pipeline.
 
IEnginePipeline FireEngineStarting ()
 Fires an engine starting event to each handler in the pipeline. Should be used by the engine implementation to signal its handlers that they should initialize.
 
IEnginePipeline FireEngineStateChanged ()
 Fires an engine state changed event to each handler in the pipeline. Should be used by the engine implementation to signal its handlers that they should respond to the new engine state, e.g. the engine failed or was shutdown.
 
IEnginePipeline FireFailed (EngineFailedException failure)
 Fires an engine failed event into each EngineHandler in the pipeline indicating that the engine is now failed and should not accept or produce new work.
 
IEnginePipeline FireRead (IProtonBuffer input)
 Fires a read event consisting of the given proton buffer into the pipeline starting from the last engine handler in the pipeline and moving through each until the incoming work is fully processed. If the read events reaches the head of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state.
 
IEnginePipeline FireRead (HeaderEnvelope header)
 Fires a read event consisting of the given header envelope into the pipeline starting from the last engine handler in the pipeline and moving through each until the incoming work is fully processed. If the read events reaches the head of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state.
 
IEnginePipeline FireRead (SaslEnvelope envelope)
 Fires a read event consisting of the given SASL envelope into the pipeline starting from the last engine handler in the pipeline and moving through each until the incoming work is fully processed. If the read events reaches the head of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state.
 
IEnginePipeline FireRead (IncomingAmqpEnvelope envelope)
 Fires a read event consisting of the given AMQP envelope into the pipeline starting from the last engine handler in the pipeline and moving through each until the incoming work is fully processed. If the read events reaches the head of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state.
 
IEnginePipeline FireWrite (HeaderEnvelope envelope)
 Fires a write event consisting of the given header envelope into the pipeline starting from the first engine in the pipeline and moving through each until the outgoing work is fully processed. If the write events reaches the tail of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state. It is expected that after the fire write method returns the given envelope will have been written or if held for later the object must be copied.
 
IEnginePipeline FireWrite (OutgoingAmqpEnvelope envelope)
 Fires a write event consisting of the given AMQP envelope into the pipeline starting from the first engine in the pipeline and moving through each until the outgoing work is fully processed. If the write events reaches the tail of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state. It is expected that after the fire write method returns the given envelope will have been written or if held for later the object must be copied. When the payload given exceeds the maximum allowed frame size when encoded into an outbound frame the encoding handler should either throw an error in the case that the performative being written cannot truncate its payload or should invoke the payload to large handler of the envelope before re-encoding the outbound performative and truncating the payload.
 
IEnginePipeline FireWrite (SaslEnvelope envelope)
 Fires a write event consisting of the given SASL envelope into the pipeline starting from the first engine in the pipeline and moving through each until the outgoing work is fully processed. If the write events reaches the tail of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state. It is expected that after the fire write method returns the given envelope will have been written or if held for later the object must be copied.
 
IEnginePipeline FireWrite (IProtonBuffer buffer, Action ioComplete)
 Fires a write event consisting of the given proton buffer into the pipeline starting from the first engine in the pipeline and moving through each until the outgoing work is fully processed. If the write events reaches the tail of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state.
 

Properties

IEngine Engine [get]
 Provides access to the engine that owns this engine pipeline.
 
- Properties inherited from Apache.Qpid.Proton.Engine.IEnginePipeline

Detailed Description

Wrapper around the internal ProtonEnginePipeline used to present a guarded pipeline to the outside world when the Engine::pipeline method is used to gain access to the pipeline. The proxy will ensure that any read or write calls enforce Engine state such as not started and shutdown.

Member Function Documentation

◆ AddFirst()

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.AddFirst ( string  name,
IEngineHandler  handler 
)
inline

Adds the given handler to the front of the pipeline with the given name stored for later lookup or remove operations. It is not mandatory that each handler have unique names although if handlers do share a name the remove method will only remove them one at a time starting from the first in the pipeline.

Parameters
nameThe name to assign to the added handler
handlerThe handler to add
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ AddLast()

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.AddLast ( string  name,
IEngineHandler  handler 
)
inline

Adds the given handler to the end of the pipeline with the given name stored for later lookup or remove operations. It is not mandatory that each handler have unique names although if handlers do share a name the remove method will only remove them one at a time starting from the first in the pipeline.

Parameters
nameThe name to assign to the added handler
handlerThe handler to add
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ Find()

IEngineHandler Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.Find ( string  name)
inline

Finds and returns first handler that is found in the pipeline that matches the given name.

Parameters
nameThe name to search for in the pipeline moving from first to last.
Returns
The removed handler or null if not found.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireEngineStarting()

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireEngineStarting ( )
inline

Fires an engine starting event to each handler in the pipeline. Should be used by the engine implementation to signal its handlers that they should initialize.

Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireEngineStateChanged()

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireEngineStateChanged ( )
inline

Fires an engine state changed event to each handler in the pipeline. Should be used by the engine implementation to signal its handlers that they should respond to the new engine state, e.g. the engine failed or was shutdown.

Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireFailed()

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireFailed ( EngineFailedException  failure)
inline

Fires an engine failed event into each EngineHandler in the pipeline indicating that the engine is now failed and should not accept or produce new work.

Parameters
failureThe error that indicates why the engine has failed
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireRead() [1/4]

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireRead ( HeaderEnvelope  header)
inline

Fires a read event consisting of the given header envelope into the pipeline starting from the last engine handler in the pipeline and moving through each until the incoming work is fully processed. If the read events reaches the head of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state.

Parameters
headerThe header envelope to process
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireRead() [2/4]

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireRead ( IncomingAmqpEnvelope  envelope)
inline

Fires a read event consisting of the given AMQP envelope into the pipeline starting from the last engine handler in the pipeline and moving through each until the incoming work is fully processed. If the read events reaches the head of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state.

Parameters
envelopeThe AMQP envelope to process
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireRead() [3/4]

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireRead ( IProtonBuffer  input)
inline

Fires a read event consisting of the given proton buffer into the pipeline starting from the last engine handler in the pipeline and moving through each until the incoming work is fully processed. If the read events reaches the head of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state.

Parameters
inputThe incoming bytes read in a proton buffer instance.
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireRead() [4/4]

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireRead ( SaslEnvelope  envelope)
inline

Fires a read event consisting of the given SASL envelope into the pipeline starting from the last engine handler in the pipeline and moving through each until the incoming work is fully processed. If the read events reaches the head of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state.

Parameters
envelopeThe SASL envelope to process
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireWrite() [1/4]

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireWrite ( HeaderEnvelope  envelope)
inline

Fires a write event consisting of the given header envelope into the pipeline starting from the first engine in the pipeline and moving through each until the outgoing work is fully processed. If the write events reaches the tail of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state. It is expected that after the fire write method returns the given envelope will have been written or if held for later the object must be copied.

Parameters
envelopeThe SASL envelope to process
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireWrite() [2/4]

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireWrite ( IProtonBuffer  buffer,
Action  ioComplete 
)
inline

Fires a write event consisting of the given proton buffer into the pipeline starting from the first engine in the pipeline and moving through each until the outgoing work is fully processed. If the write events reaches the tail of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state.

Parameters
buffer
ioCompleteThe delegate to invoke when the IO operation is complete
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireWrite() [3/4]

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireWrite ( OutgoingAmqpEnvelope  envelope)
inline

Fires a write event consisting of the given AMQP envelope into the pipeline starting from the first engine in the pipeline and moving through each until the outgoing work is fully processed. If the write events reaches the tail of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state. It is expected that after the fire write method returns the given envelope will have been written or if held for later the object must be copied. When the payload given exceeds the maximum allowed frame size when encoded into an outbound frame the encoding handler should either throw an error in the case that the performative being written cannot truncate its payload or should invoke the payload to large handler of the envelope before re-encoding the outbound performative and truncating the payload.

Parameters
envelopeThe AMQP envelope to process
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FireWrite() [4/4]

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FireWrite ( SaslEnvelope  envelope)
inline

Fires a write event consisting of the given SASL envelope into the pipeline starting from the first engine in the pipeline and moving through each until the outgoing work is fully processed. If the write events reaches the tail of the pipeline and is not handled by any handler an error is thrown and the engine should enter the failed state. It is expected that after the fire write method returns the given envelope will have been written or if held for later the object must be copied.

Parameters
envelopeThe SASL envelope to process
Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ First()

IEngineHandler Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.First ( )
inline

Finds and returns first handler in the pipeline.

Returns
The removed handler or null if not found.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ FirstContext()

IEngineHandlerContext Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.FirstContext ( )
inline

Returns a reference to the first engine handler context in the pipeline.

Returns
An engine handler context instance or null if no handlers in the pipeline

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ Last()

IEngineHandler Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.Last ( )
inline

Finds and returns last handler in the pipeline.

Returns
The removed handler or null if not found.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ LastContext()

IEngineHandlerContext Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.LastContext ( )
inline

Returns a reference to the last engine handler context in the pipeline.

Returns
An engine handler context instance or null if no handlers in the pipeline

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ Remove() [1/2]

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.Remove ( IEngineHandler  handler)
inline

Removes the given handler if found in the pipeline.

Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ Remove() [2/2]

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.Remove ( string  name)
inline

Removes the first handler in the pipeline that is assigned the given name.

Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ RemoveFirst()

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.RemoveFirst ( )
inline

Removes the first handler in the pipeline.

Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

◆ RemoveLast()

IEnginePipeline Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.RemoveLast ( )
inline

Removes the first handler in the pipeline.

Returns
This engine pipeline instance.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.

Property Documentation

◆ Engine

IEngine Apache.Qpid.Proton.Engine.Implementation.ProtonEnginePipelineProxy.Engine
get

Provides access to the engine that owns this engine pipeline.

Implements Apache.Qpid.Proton.Engine.IEnginePipeline.


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