Package com.lucimber.dbus.connection
Interface Pipeline
- All Superinterfaces:
InboundPropagator
,OutboundPropagator
- All Known Implementing Classes:
DefaultPipeline
Represents an ordered chain of
Handler
instances associated with a Connection
.
A Pipeline
manages the flow of inbound and outbound events through the handler chain.
Handlers can be dynamically added or removed, and events can be propagated through the pipeline.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAppends a newHandler
to the end of the pipeline.Retrieves theConnection
that this pipeline is bound to.Removes theHandler
with the specified name from the pipeline.Methods inherited from interface com.lucimber.dbus.connection.InboundPropagator
propagateConnectionActive, propagateConnectionInactive, propagateInboundFailure, propagateInboundMessage
Methods inherited from interface com.lucimber.dbus.connection.OutboundPropagator
propagateOutboundMessage
-
Method Details
-
addLast
Appends a newHandler
to the end of the pipeline.- Parameters:
name
- a unique name used to identify the handler within the pipeline.handler
- theHandler
instance to add.- Returns:
- this
Pipeline
instance for method chaining. - Throws:
IllegalArgumentException
- if a handler with the specified name already exists.
-
getConnection
Connection getConnection()Retrieves theConnection
that this pipeline is bound to.- Returns:
- the associated
Connection
instance.
-
remove
Removes theHandler
with the specified name from the pipeline.- Parameters:
name
- the unique name of the handler to remove.- Returns:
- this
Pipeline
instance for method chaining. - Throws:
IllegalArgumentException
- if no handler with the specified name exists in the pipeline.
-