org.gcube.common.ghn.service.handlers
Interface Pipeline<T extends ServiceHandler<T>>

Type Parameters:
T - the type of the registered handlers
All Known Implementing Classes:
DefaultPipeline

public interface Pipeline<T extends ServiceHandler<T>>

An ordered list ServiceHandlers registered to handle ServiceEvents of the same type.

Clients dispatch events to pipelines and handlers are responsible to forward them to subsequent handlers.

Handlers can exchange data by writing and reading from a Properties.

Author:
Fabio Simeoni
See Also:
ServiceHandler, ServiceEvent

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.
 

Method Detail

handlers

List<T> handlers()
Returns the handlers currently in the pipeline.

Returns:
the handlers

forward

void forward(ServiceEvent<T> e)
Forwards an event a step further through the pipeline.

Parameters:
e - the event

appName

String appName()
Returns the name of the managed application.

Returns:
the name

context

ServiceContext context()
Returns the properties of this pipeline

Returns:
the properties


Copyright © 2013. All Rights Reserved.