Package org.apache.qpid.protonj2.engine
Interface EngineHandlerContext
- All Known Implementing Classes:
ProtonEngineHandlerContext
public interface EngineHandlerContext
Context provided to EngineHandler events to allow further event propagation
-
Method Summary
Modifier and TypeMethodDescriptionengine()
void
Fires the engine starting event into the next handler in theEnginePipeline
chain.void
Fires the engine state changed event into the next handler in theEnginePipeline
chain.void
fireFailed
(EngineFailedException failure) Fires theEngine
failed event into the next handler in theEnginePipeline
chain.void
fireRead
(ProtonBuffer buffer) Fires a read of ProtonBuffer events into the previous handler in theEnginePipeline
for further processing.void
fireRead
(HeaderEnvelope header) Fires a read of HeaderFrame events into the previous handler in theEnginePipeline
for further processing.void
fireRead
(IncomingAMQPEnvelope envelope) Fires a read of IncomingProtocolFrame events into the previous handler in theEnginePipeline
for further processing.void
fireRead
(SASLEnvelope envelope) Fires a read of SASL events into the previous handler in theEnginePipeline
for further processing.void
fireWrite
(ProtonBuffer buffer, Runnable ioComplete) Fires a write of ProtonBuffer events into the next handler in theEnginePipeline
for further processing.void
fireWrite
(HeaderEnvelope envelope) Fires a write of HeaderFrame events into the next handler in theEnginePipeline
for further processing.void
fireWrite
(OutgoingAMQPEnvelope envelope) Fires a write ofOutgoingAMQPEnvelope
events into the next handler in theEnginePipeline
for further processing.void
fireWrite
(SASLEnvelope envelope) Fires a write ofSASLEnvelope
events into the next handler in theEnginePipeline
for further processing.handler()
name()
-
Method Details
-
handler
EngineHandler handler()- Returns:
- the
EngineHandler
that is associated with the context.
-
engine
Engine engine()- Returns:
- the
Engine
where this handler is registered.
-
name
String name()- Returns:
- the name that assigned to this
EngineHandler
when added to theEnginePipeline
.
-
fireEngineStarting
void fireEngineStarting()Fires the engine starting event into the next handler in theEnginePipeline
chain. -
fireEngineStateChanged
void fireEngineStateChanged()Fires the engine state changed event into the next handler in theEnginePipeline
chain. The state change events occur after the engine starting event and generally signify that the engine has been shutdown normally. -
fireFailed
Fires theEngine
failed event into the next handler in theEnginePipeline
chain.- Parameters:
failure
- The exception that describes the conditions under which the engine failed.
-
fireRead
Fires a read of ProtonBuffer events into the previous handler in theEnginePipeline
for further processing.- Parameters:
buffer
- TheProtonBuffer
that carries the bytes read.
-
fireRead
Fires a read of HeaderFrame events into the previous handler in theEnginePipeline
for further processing.- Parameters:
header
- TheHeaderEnvelope
that carries the header bytes read.
-
fireRead
Fires a read of SASL events into the previous handler in theEnginePipeline
for further processing.- Parameters:
envelope
- TheSASLEnvelope
that carries the SASL performative read.
-
fireRead
Fires a read of IncomingProtocolFrame events into the previous handler in theEnginePipeline
for further processing.- Parameters:
envelope
- TheIncomingAMQPEnvelope
that carries the AMQP performative read.
-
fireWrite
Fires a write ofOutgoingAMQPEnvelope
events into the next handler in theEnginePipeline
for further processing.- Parameters:
envelope
- TheOutgoingAMQPEnvelope
that carries the AMQP performative being written.
-
fireWrite
Fires a write ofSASLEnvelope
events into the next handler in theEnginePipeline
for further processing.- Parameters:
envelope
- TheSASLEnvelope
that carries the SASL performative being written.
-
fireWrite
Fires a write of HeaderFrame events into the next handler in theEnginePipeline
for further processing.- Parameters:
envelope
- TheHeaderEnvelope
that carries the AMQP Header being written.
-
fireWrite
Fires a write of ProtonBuffer events into the next handler in theEnginePipeline
for further processing.- Parameters:
buffer
- TheProtonBuffer
that carries the bytes being written.ioComplete
- An optionalRunnable
callback that is signaled when the I/O completes successfully.
-