net.sf.seide.core
Interface Dispatcher

All Superinterfaces:
Lifecycle
All Known Implementing Classes:
DispatcherImpl

public interface Dispatcher
extends Lifecycle

Dispatcher is the basic interface for the entry point to route messages through the Stages.

Author:
german.kondolf
See Also:
Stage}, EventHandler}, Message}

Method Summary
 void execute(Event event)
          Routes the Event to the specified Stage executing the associated EventHandler.
 void execute(String stage, Message message)
          Routes the Message to the specified Stage executing the associated EventHandler.
 String getContext()
           
 void setContext(String context)
          This parameter sets a context, to allow different flows running at the same time and it is propagated in logs & JXM metrics.
 void setStages(List<Stage> stages)
          Stage list of supported flow EventHandler.
 
Methods inherited from interface net.sf.seide.core.Lifecycle
isRunning, start, stop
 

Method Detail

execute

void execute(String stage,
             Message message)
Routes the Message to the specified Stage executing the associated EventHandler.

Parameters:
stage - Stage.id
message - payload.

execute

void execute(Event event)
Routes the Event to the specified Stage executing the associated EventHandler.

Parameters:
stage - Stage.id
data - payload.

setStages

void setStages(List<Stage> stages)
Stage list of supported flow EventHandler.

Parameters:
stages - Stage list.

getContext

String getContext()
Returns:
The dispatcher context identifier.

setContext

void setContext(String context)
This parameter sets a context, to allow different flows running at the same time and it is propagated in logs & JXM metrics.

Parameters:
context -


Copyright © 2011. All Rights Reserved.