Spring Integration

org.springframework.integration.twitter
Class OutboundDMStatusMessageHandler

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.twitter.AbstractOutboundTwitterEndpointSupport
              extended by org.springframework.integration.twitter.OutboundDMStatusMessageHandler
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, Lifecycle, Phased, SmartLifecycle, NamedComponent, MessageHandler

public class OutboundDMStatusMessageHandler
extends AbstractOutboundTwitterEndpointSupport

Simple adapter to support sending outbound direct messages ("DM"s) using twitter

Author:
Josh Long
See Also:
TwitterHeaders, Twitter

Field Summary
 
Fields inherited from class org.springframework.integration.twitter.AbstractOutboundTwitterEndpointSupport
configuration, statusUpdateSupport, twitter
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
OutboundDMStatusMessageHandler()
           
 
Method Summary
 void handleMessage(Message<?> message)
          Handles the message if possible.
 
Methods inherited from class org.springframework.integration.twitter.AbstractOutboundTwitterEndpointSupport
doStart, doStop, onInit, setConfiguration
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getRequiredMetadataPersister, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OutboundDMStatusMessageHandler

public OutboundDMStatusMessageHandler()
Method Detail

handleMessage

public void handleMessage(Message<?> message)
                   throws MessageRejectedException,
                          MessageHandlingException,
                          MessageDeliveryException
Description copied from interface: MessageHandler
Handles the message if possible. If the handler cannot deal with the message this will result in a MessageRejectedException e.g. in case of a Selective Consumer. When a consumer tries to handle a message, but fails to do so, a MessageHandlingException is thrown. In the last case it is recommended to treat the message as tainted and go into an error scenario.

When the handling results in a failure of another message being sent (e.g. a "reply" message), that failure will trigger a MessageDeliveryException.

Parameters:
message - the message to be handled
Throws:
MessageRejectedException - if the handler doesn't accept the message
MessageHandlingException - when something fails during the handling
MessageDeliveryException - when this handler failed to deliver the reply related to the handling of the message

Spring Integration

Copyright © 2010. All Rights Reserved.