Package org.drasyl.pipeline
Class DefaultPipeline
java.lang.Object
org.drasyl.pipeline.DefaultPipeline
- All Implemented Interfaces:
 Pipeline
- Direct Known Subclasses:
 DrasylPipeline,EmbeddedPipeline
Abstract 
Pipeline implementation, that needs head and tail.- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DrasylConfigprotected org.drasyl.pipeline.AbstractEndHandlerprotected Identityprotected TypeValidatorprotected TypeValidatorprotected io.reactivex.rxjava3.core.Schedulerprotected org.drasyl.pipeline.AbstractEndHandler - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionInserts aHandlerafter an existing handler of this pipeline.Inserts aHandlerbefore an existing handler of this pipeline.Inserts aHandlerat the first position of this pipeline.Appends aHandlerat the last position of this pipeline.Returns the context object of theHandlerwith the specified name in this pipeline.Returns theHandlerwith the specified name in this pipeline.protected voidprocessInbound(Event event) Processes an inbound event by the pipeline.processInbound(Message msg) Processes an inbound message by the pipeline.processInbound(Address sender, Object msg) Processes an inbound message by the pipeline.processOutbound(Address recipient, Object msg) Processes an outbound message by the pipeline.Removes theHandlerwith the specified name from this pipeline.Replaces theHandlerof the specified name with a new handler in this pipeline. 
- 
Field Details
- 
handlerNames
 - 
head
protected org.drasyl.pipeline.AbstractEndHandler head - 
tail
protected org.drasyl.pipeline.AbstractEndHandler tail - 
scheduler
protected io.reactivex.rxjava3.core.Scheduler scheduler - 
config
 - 
identity
 - 
inboundValidator
 - 
outboundValidator
 
 - 
 - 
Constructor Details
- 
DefaultPipeline
public DefaultPipeline() 
 - 
 - 
Method Details
- 
initPointer
protected void initPointer() - 
addFirst
Description copied from interface:PipelineInserts aHandlerat the first position of this pipeline. - 
addLast
Description copied from interface:PipelineAppends aHandlerat the last position of this pipeline. - 
addBefore
Description copied from interface:PipelineInserts aHandlerbefore an existing handler of this pipeline. - 
addAfter
Description copied from interface:PipelineInserts aHandlerafter an existing handler of this pipeline. - 
remove
Description copied from interface:PipelineRemoves theHandlerwith the specified name from this pipeline. - 
replace
Description copied from interface:PipelineReplaces theHandlerof the specified name with a new handler in this pipeline. - 
get
Description copied from interface:PipelineReturns theHandlerwith the specified name in this pipeline. - 
context
Description copied from interface:PipelineReturns the context object of theHandlerwith the specified name in this pipeline. - 
processInbound
Description copied from interface:PipelineProcesses an inbound message by the pipeline.- Specified by:
 processInboundin interfacePipeline- Parameters:
 sender- the sender of the messagemsg- the inbound message
 - 
processInbound
Description copied from interface:PipelineProcesses an inbound message by the pipeline.- Specified by:
 processInboundin interfacePipeline- Parameters:
 msg- the inbound message
 - 
processInbound
Description copied from interface:PipelineProcesses an inbound event by the pipeline.- Specified by:
 processInboundin interfacePipeline- Parameters:
 event- the inbound event
 - 
processOutbound
Description copied from interface:PipelineProcesses an outbound message by the pipeline.- Specified by:
 processOutboundin interfacePipeline- Parameters:
 recipient- the recipient of the messagemsg- the outbound message- Returns:
 - a completed future if the message was successfully processed, otherwise an exceptionally future
 
 
 -