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.correlation
Interface EventCorrelatorCallback

All Known Implementing Classes:
  CollectionCorrelatorCallback, ResequenceCorrelatorCallback, ResequenceMessagesCorrelatorCallback

    public interface EventCorrelatorCallback

A callback used to allow pluggable behaviour when correlating events

Method Summary
`MuleEvent` | `aggregateEvents(EventGroup events)` This method is invoked if the shouldAggregate method is called and returns true.
`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)` Determines if the event group is ready to be aggregated.

Method Detail

### shouldAggregateEvents

    boolean shouldAggregateEvents(EventGroup events)

  Determines if the event group is ready to be aggregated. if the group is ready to be aggregated (this is entirely up to the application. it could be determined by volume, last modified time or some oher criteria based on the last event received).

  Parameters:
    `events` - The current event group received by the correlator
  Returns:
    true if the group is ready for aggregation

### aggregateEvents

    MuleEvent aggregateEvents(EventGroup events)
                              throws RoutingException

  This method is invoked if the shouldAggregate method is called and returns true. Once this method returns an aggregated message, the event group is removed from the router.

  Parameters:
    `events` - the event group for this request
  Returns:
    an aggregated message
  Throws:
    `AggregationException` - if the aggregation fails. in this scenario the whole event group is removed and passed to the exception handler for this component
    `RoutingException`

### createEventGroup

    EventGroup createEventGroup(MuleEvent event,
                                Object id)

  Creates the event group with a specific correlation size based on the Mule Correlation support

  Parameters:
    `id` - The group id
    `event` - the current event
  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-2010 MuleSoft, Inc.. All Rights Reserved.