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, ServiceContext context)
          Creates an instance with a given set of handlers and a Properties.
 
Method Summary
 String appName()
          Returns the name of the managed application.
 ServiceContext context()
          Returns the properties of this pipeline
 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,
                       ServiceContext context)
Creates an instance with a given set of handlers and a Properties.

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

Parameters:
handlers - the handlers
board - the board
Method Detail

context

public ServiceContext context()
Description copied from interface: Pipeline
Returns the properties of this pipeline

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

appName

public String appName()
Description copied from interface: Pipeline
Returns the name of the managed application.

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

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 © 2013. All Rights Reserved.