Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.routing
Class SingleCorrelatorCallback

    java.lang.Object
      org.mule.routing.SingleCorrelatorCallback

All Implemented Interfaces:
  EventCorrelatorCallback

    public class SingleCorrelatorCallback

extends Object
implements EventCorrelatorCallback

A Correlator that correlates one message at a time

Field Summary
`protected Log` | `logger` logger used by this class

Constructor Summary
`SingleCorrelatorCallback()`

Method Summary
`MuleMessage` | `aggregateEvents(EventGroup events)` The `SingleResponseRouter` will always return the first event of an event group.
`EventGroup` | `createEventGroup(MuleEvent event, Object id)` Creates the event group with a specific correlation size based on the Mule Correlation support
`boolean` | `shouldAggregateEvents(EventGroup events)` The `SingleResponseRouter` will return true if the event group size is 1.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### logger

    protected final transient Log logger

  logger used by this class

Constructor Detail

### SingleCorrelatorCallback

    public SingleCorrelatorCallback()

Method Detail

### shouldAggregateEvents

    public 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 interface `EventCorrelatorCallback`
  Parameters:
    `events` - event group to consider
  Returns:
    true if the event group size is 1 or greater
  See Also:
    `EventCorrelatorCallback.shouldAggregateEvents(EventGroup)`

### aggregateEvents

    public MuleMessage aggregateEvents(EventGroup events)
                                throws RoutingException

  The `SingleResponseRouter` will always return the first event of an event group.

  Specified by:
    `aggregateEvents` in interface `EventCorrelatorCallback`
  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
    `AggregationException` - if the aggregation fails. in this scenario the whole event group is removed and passed to the exception handler for this component
  See Also:
    `AbstractResponseAggregator.aggregateEvents(EventGroup)`

### createEventGroup

    public EventGroup createEventGroup(MuleEvent event,
                                       Object id)

  Description copied from interface: `EventCorrelatorCallback`
  Creates the event group with a specific correlation size based on the Mule Correlation support

  Specified by:
    `createEventGroup` in interface `EventCorrelatorCallback`
  Parameters:
    `event` - the current event
    `id` - The group id
  Returns:
    a new event group of a fixed size

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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