Proton DotNet
|
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...
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. | |
![]() |
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.
|
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.
name | The name to assign to the added handler |
handler | The handler to add |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
name | The name to assign to the added handler |
handler | The handler to add |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
inline |
Finds and returns first handler that is found in the pipeline that matches the given name.
name | The name to search for in the pipeline moving from first to last. |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
failure | The error that indicates why the engine has failed |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
header | The header envelope to process |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
envelope | The AMQP envelope to process |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
input | The incoming bytes read in a proton buffer instance. |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
envelope | The SASL envelope to process |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
envelope | The SASL envelope to process |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
buffer | |
ioComplete | The delegate to invoke when the IO operation is complete |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
envelope | The AMQP envelope to process |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
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.
envelope | The SASL envelope to process |
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
inline |
Finds and returns first handler in the pipeline.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
inline |
Returns a reference to the first engine handler context in the pipeline.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
inline |
Finds and returns last handler in the pipeline.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
inline |
Returns a reference to the last engine handler context in the pipeline.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
inline |
Removes the given handler if found in the pipeline.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
inline |
Removes the first handler in the pipeline that is assigned the given name.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
inline |
Removes the first handler in the pipeline.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
inline |
Removes the first handler in the pipeline.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.
|
get |
Provides access to the engine that owns this engine pipeline.
Implements Apache.Qpid.Proton.Engine.IEnginePipeline.