org.ikasan.framework.component.routing
Class SingleResultRouter

java.lang.Object
  extended by org.ikasan.framework.component.routing.SingleResultRouter
All Implemented Interfaces:
Router, FlowComponent
Direct Known Subclasses:
AbstractFilteringRouter, ContainsPayloadRouter, FirstPayloadAttributeRouter, XMLValidatorRouter, XPathSelectorRouter

public abstract class SingleResultRouter
extends Object
implements Router

Simple abstraction for Router implementations that are only ever to return a single result

Author:
Ikasan Development Team

Field Summary
 
Fields inherited from interface org.ikasan.framework.component.routing.Router
DEFAULT_RESULT
 
Constructor Summary
SingleResultRouter()
           
 
Method Summary
protected abstract  String evaluate(Event event)
          Returns a single value as a result of evaluating the Event
 List<String> onEvent(Event event)
          Implementation of Router.onEvent(Event)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleResultRouter

public SingleResultRouter()
Method Detail

onEvent

public List<String> onEvent(Event event)
                     throws RouterException
Implementation of Router.onEvent(Event)

Specified by:
onEvent in interface Router
Parameters:
event - The event to route
Returns:
List of paths
Throws:
RouterException - Exception if we could bnot route the event

evaluate

protected abstract String evaluate(Event event)
                            throws RouterException
Returns a single value as a result of evaluating the Event

Parameters:
event - to evaluate
Returns:
result
Throws:
RouterException - Exception if we could not route the event


Copyright © 2007-2012 Ikasan. All Rights Reserved.