Class EmbeddedPipeline

java.lang.Object
org.drasyl.pipeline.DefaultPipeline
org.drasyl.pipeline.EmbeddedPipeline
All Implemented Interfaces:
Pipeline

public class EmbeddedPipeline extends DefaultPipeline
Embedded Pipeline implementation, that allows easy testing of Handlers.
  • Constructor Details

    • EmbeddedPipeline

      public EmbeddedPipeline(Identity identity, TypeValidator inboundValidator, TypeValidator outboundValidator, Handler... handlers)
      Creates a new embedded pipeline and adds all given handler to it. Handler are added with their simple class name.
      Parameters:
      identity - the identity
      inboundValidator - the inbound validator
      outboundValidator - the outbound validator
      handlers - the handlers
    • EmbeddedPipeline

      public EmbeddedPipeline(Identity identity, TypeValidator inboundValidator, TypeValidator outboundValidator)
  • Method Details

    • inboundMessages

      public io.reactivex.rxjava3.core.Observable<Pair<CompressedPublicKey,Object>> inboundMessages()
      Returns:
      all messages that passes the pipeline until the end
    • inboundEvents

      public io.reactivex.rxjava3.core.Observable<Event> inboundEvents()
      Returns:
      all events that passes the pipeline until the end
    • outboundMessages

      public <T> io.reactivex.rxjava3.core.Observable<T> outboundMessages(Class<T> clazz)
      Returns:
      all messages that passes the pipeline until the end