org.springframework.integration.adapter.event
Class ApplicationEventTarget<T>
java.lang.Object
org.springframework.integration.adapter.event.ApplicationEventTarget<T>
- All Implemented Interfaces:
- org.springframework.context.ApplicationEventPublisherAware, MessageTarget
public class ApplicationEventTarget<T>
- extends java.lang.Object
- implements MessageTarget, org.springframework.context.ApplicationEventPublisherAware
A message target for publishing MessagingEvents
. The
MessagingEvent
is a subclass of Spring's ApplicationEvent
used by this adapter to wrap any Message
sent to this target.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mapper
private final MessageMapper<T,MessagingEvent<T>> mapper
applicationEventPublisher
private org.springframework.context.ApplicationEventPublisher applicationEventPublisher
ApplicationEventTarget
public ApplicationEventTarget()
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
- Specified by:
setApplicationEventPublisher
in interface org.springframework.context.ApplicationEventPublisherAware
send
public boolean send(Message<?> message)
- Description copied from interface:
MessageTarget
- Send a
Message
to this target. May throw a RuntimeException for non-recoverable
errors. Otherwise, if the Message cannot be sent for a non-fatal reason such as timeout,
then this method will return 'false', and if the Message is sent successfully, it will
return 'true'.
- Specified by:
send
in interface MessageTarget
- Parameters:
message
- the Message to send
- Returns:
- whether the Message has been sent successfully