org.gcube.common.ghn.service.handlers
Class DefaultPipeline<T extends ServiceHandler<T>>

java.lang.Object
  extended by org.gcube.common.ghn.service.handlers.DefaultPipeline<T>
Type Parameters:
T -
All Implemented Interfaces:
Pipeline<T>

public class DefaultPipeline<T extends ServiceHandler<T>>
extends Object
implements Pipeline<T>

Default implementation of Pipeline.

Author:
Fabio Simeoni

Constructor Summary
DefaultPipeline(List<T> handlers)
          Creates an instance with a given set of handlers.
 
Method Summary
 void forward(ServiceEvent<T> e)
          Forwards an event a step further through the pipeline.
 List<T> handlers()
          Returns the handlers currently in the pipeline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPipeline

public DefaultPipeline(List<T> handlers)
Creates an instance with a given set of handlers.

Modification to the input List are not reflected in the Pipeline.

Parameters:
handlers - the handlers
Method Detail

handlers

public List<T> handlers()
Description copied from interface: Pipeline
Returns the handlers currently in the pipeline.

Specified by:
handlers in interface Pipeline<T extends ServiceHandler<T>>
Returns:
the handlers

forward

public void forward(ServiceEvent<T> e)
Description copied from interface: Pipeline
Forwards an event a step further through the pipeline.

Specified by:
forward in interface Pipeline<T extends ServiceHandler<T>>
Parameters:
e - the event


Copyright © 2012. All Rights Reserved.