public class EventPublishingMessageChannelAdapter extends Object implements org.springframework.integration.core.MessageHandler
| Constructor and Description |
|---|
EventPublishingMessageChannelAdapter(EventBus eventBus)
Initialize the adapter to publish all incoming events to the given
eventBus. |
EventPublishingMessageChannelAdapter(EventBus eventBus,
EventFilter filter)
Initialize the adapter to publish all incoming events to the given
eventBus if they accepted by the
given filter. |
public EventPublishingMessageChannelAdapter(EventBus eventBus)
eventBus.eventBus - The event bus to publish events onpublic EventPublishingMessageChannelAdapter(EventBus eventBus, EventFilter filter)
eventBus if they accepted by the
given filter.eventBus - The event bus to publish events on.filter - The filter that indicates which events to publish.public void handleMessage(org.springframework.integration.Message<?> message)
message. The message is expected to contain an object of type EventMessage in its payload. If that is not the case, a MessageRejectedException is
thrown.
If the message does contain an EventMessage, but the filter
refuses
it, a MessageRejectedException is also thrown.handleMessage in interface org.springframework.integration.core.MessageHandlermessage - The message containing the event to publishorg.springframework.integration.MessageRejectedException - is the payload could not be published on the event bus.Copyright © 2010-2014. All Rights Reserved.