org.mule.routing.response
Class AbstractResponseRouter

java.lang.Object
  extended by org.mule.routing.AbstractRouter
      extended by org.mule.routing.response.AbstractResponseRouter
All Implemented Interfaces:
MuleContextAware, Disposable, Initialisable, ResponseRouter, Router
Direct Known Subclasses:
AbstractResponseAggregator

public abstract class AbstractResponseRouter
extends AbstractRouter
implements ResponseRouter

AbstractResponseRouter is a base class for all Response Routers


Field Summary
protected  Log logger
           
protected  MessageInfoMapping messageInfoMapping
           
 
Fields inherited from class org.mule.routing.AbstractRouter
muleContext
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
AbstractResponseRouter()
           
 
Method Summary
protected  Object getCallResponseAggregateIdentifier(MuleMessage message)
          Extracts a Group identifier from the current event.
 MessageInfoMapping getMessageInfoMapping()
           
protected  Object getReplyAggregateIdentifier(MuleMessage message)
          Extracts a 'Correlation Id' from a reply message.
 void setMessageInfoMapping(MessageInfoMapping messageInfoMapping)
           
 
Methods inherited from class org.mule.routing.AbstractRouter
dispose, getMuleContext, getRouterStatistics, initialise, setMuleContext, setRouterStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.api.routing.ResponseRouter
getResponse, getTimeout, isFailOnTimeout, process, setFailOnTimeout, setTimeout
 
Methods inherited from interface org.mule.api.routing.Router
getRouterStatistics, setRouterStatistics
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Field Detail

logger

protected final Log logger

messageInfoMapping

protected MessageInfoMapping messageInfoMapping
Constructor Detail

AbstractResponseRouter

public AbstractResponseRouter()
Method Detail

getMessageInfoMapping

public MessageInfoMapping getMessageInfoMapping()

setMessageInfoMapping

public void setMessageInfoMapping(MessageInfoMapping messageInfoMapping)

getReplyAggregateIdentifier

protected Object getReplyAggregateIdentifier(MuleMessage message)
Extracts a 'Correlation Id' from a reply message. The correlation Id does not have to be the Message Correlation Id. It can be extracted from the message payload if desired.

Parameters:
message - a received reply message
Returns:
the correlation Id for this message

getCallResponseAggregateIdentifier

protected Object getCallResponseAggregateIdentifier(MuleMessage message)
Extracts a Group identifier from the current event. When an event is received with a group identifier not registered with this router, a new group is created. The id returned here can be a correlationId or some custom aggregation Id. This implementation uses the Unique Message Id of the MuleMessage being returned a

Parameters:
message - A response messages received on the response router endpoint
Returns:
an aggregation Id for this event


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.