org.springframework.integration.jmx
Class NotificationPublishingMessageHandler

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.handler.AbstractMessageHandler
          extended by org.springframework.integration.jmx.NotificationPublishingMessageHandler
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, Ordered, NamedComponent, Orderable, MessageHandler, TrackableComponent

public class NotificationPublishingMessageHandler
extends AbstractMessageHandler
implements BeanFactoryAware, InitializingBean

Since:
2.0

Field Summary
 
Fields inherited from class org.springframework.integration.handler.AbstractMessageHandler
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
NotificationPublishingMessageHandler(javax.management.ObjectName objectName)
           
NotificationPublishingMessageHandler(java.lang.String objectName)
           
 
Method Summary
protected  void handleMessageInternal(Message<?> message)
           
 void onInit()
          Subclasses may implement this for initialization logic.
 void setDefaultNotificationType(java.lang.String defaultNotificationType)
          Specify a dot-delimited String representing the Notification type to use by default when no explicit Notification mapper has been configured.
 void setNotificationMapper(OutboundMessageMapper<javax.management.Notification> notificationMapper)
          Set a mapper for creating Notifications from a Message.
 
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
getComponentType, getOrder, handleMessage, setOrder, setShouldTrack
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.beans.factory.BeanFactoryAware
setBeanFactory
 
Methods inherited from interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName
 

Constructor Detail

NotificationPublishingMessageHandler

public NotificationPublishingMessageHandler(javax.management.ObjectName objectName)

NotificationPublishingMessageHandler

public NotificationPublishingMessageHandler(java.lang.String objectName)
Method Detail

setNotificationMapper

public void setNotificationMapper(OutboundMessageMapper<javax.management.Notification> notificationMapper)
Set a mapper for creating Notifications from a Message. If not provided, a default implementation will be used such that String-typed payloads will be passed as the 'message' of the Notification and all other payload types will be passed as the 'userData' of the Notification.


setDefaultNotificationType

public void setDefaultNotificationType(java.lang.String defaultNotificationType)
Specify a dot-delimited String representing the Notification type to use by default when no explicit Notification mapper has been configured. If not provided, then a notification type header will be required for each message being mapped into a Notification.


onInit

public final void onInit()
                  throws java.lang.Exception
Description copied from class: IntegrationObjectSupport
Subclasses may implement this for initialization logic.

Overrides:
onInit in class IntegrationObjectSupport
Throws:
java.lang.Exception

handleMessageInternal

protected void handleMessageInternal(Message<?> message)
                              throws java.lang.Exception
Specified by:
handleMessageInternal in class AbstractMessageHandler
Throws:
java.lang.Exception