Spring Integration

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, MessageHandler, NamedComponent

public class NotificationPublishingMessageHandler
extends AbstractMessageHandler
implements BeanFactoryAware, InitializingBean

Since:
2.0
Author:
Mark Fisher

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(ObjectName objectName)
           
NotificationPublishingMessageHandler(String objectName)
           
 
Method Summary
protected  void handleMessageInternal(Message<?> message)
           
 void onInit()
          Subclasses may implement this for initialization logic.
 void setDefaultNotificationType(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<Notification> notificationMapper)
          Set a mapper for creating Notifications from a Message.
 
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
getComponentType, getOrder, handleMessage, resolveReplyChannel, setOrder
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setTaskScheduler, toString, writeMessageHistory
 
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
 

Constructor Detail

NotificationPublishingMessageHandler

public NotificationPublishingMessageHandler(ObjectName objectName)

NotificationPublishingMessageHandler

public NotificationPublishingMessageHandler(String objectName)
Method Detail

setNotificationMapper

public void setNotificationMapper(OutboundMessageMapper<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(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 Exception
Description copied from class: IntegrationObjectSupport
Subclasses may implement this for initialization logic.

Overrides:
onInit in class IntegrationObjectSupport
Throws:
Exception

handleMessageInternal

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

Spring Integration

Copyright © 2010. All Rights Reserved.