org.mule.routing.response
Class SingleResponseRouter
java.lang.Object
org.mule.routing.AbstractRouter
org.mule.routing.response.AbstractResponseRouter
org.mule.routing.response.AbstractResponseAggregator
org.mule.routing.response.SingleResponseRouter
- All Implemented Interfaces:
- MuleContextAware, Disposable, Initialisable, ResponseRouter, Router
public class SingleResponseRouter
- extends AbstractResponseAggregator
Handles single event responses from a replyTo address. If multiple responses will
be received for a single invocation, the ResponseCorrelationAggregator
should be used.
Methods inherited from class org.mule.routing.response.AbstractResponseAggregator |
addEventGroup, addProcessedGroup, createEventGroup, getEventGroup, getResponse, getTimeout, initialise, isFailOnTimeout, isGroupAlreadyProcessed, process, removeEventGroup, setFailOnTimeout, setTimeout |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleResponseRouter
public SingleResponseRouter()
shouldAggregateEvents
protected boolean shouldAggregateEvents(EventGroup events)
- The
SingleResponseRouter
will return true if the event group
size is 1. If the group size is greater than 1, a warning will be logged.
- Specified by:
shouldAggregateEvents
in class AbstractResponseAggregator
- Parameters:
events
-
- Returns:
- true if the event group size is 1 or greater
- See Also:
AbstractResponseAggregator#shouldAggregateEvents(EventGroup)}
aggregateEvents
protected MuleMessage aggregateEvents(EventGroup events)
throws RoutingException
- The
SingleResponseRouter
will always return the first event of
an event group.
- Specified by:
aggregateEvents
in class AbstractResponseAggregator
- Parameters:
events
- the event group for this request
- Returns:
- an aggregated message
- Throws:
RoutingException
- if the aggregation fails. in
this scenario the whole event group is removed and passed to the
exception handler for this componenet- See Also:
AbstractResponseAggregator#aggregateEvents(EventGroup)}
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.