org.gcube.smartgears.handlers
Class Pipeline<E,H extends Handler<E>>

java.lang.Object
  extended by 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 Summary
Pipeline(List<H> handlers)
          Creates an instance with a given list of handlers.
 
Method Summary
 void forward(E event)
          Forwards an event through the pipeline.
 List<H> handlers()
          Returns the handlers in this pipeline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2014. All Rights Reserved.