Class Pipeline<E,H extends Handler<E>>

java.lang.Object
org.gcube.smartgears.handlers.Pipeline<E,H>
Type Parameters:
E - the type of events
H - the type of handlers
Direct Known Subclasses:
ApplicationPipeline, ContainerPipeline

public abstract class Pipeline<E,H extends Handler<E>> extends Object
An ordered list Handlers that handle related events.
Author:
Fabio Simeoni
  • Constructor Details

    • Pipeline

      public Pipeline(List<H> handlers)
      Creates an instance with a given list of handlers.

      Modification to the input list do not affect the pipeline.

      Parameters:
      handlers - the handlers
  • Method Details

    • handlers

      public List<H> handlers()
      Returns the handlers in this pipeline.

      Modification to the input list do not affect the pipeline.

      Returns:
      the handlers
    • forward

      public void forward(E event)
      Forwards an event through the pipeline.
      Parameters:
      event - the event