org.springframework.integration.xmpp.presence
Class XmppRosterEventMessageSendingHandler

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

public class XmppRosterEventMessageSendingHandler
extends AbstractMessageHandler
implements Lifecycle

This class will facilitate publishing updated presence values for a given connection. This change happens on the Roster.setSubscriptionMode(org.jivesoftware.smack.Roster.SubscriptionMode) property.

Since:
2.0
See Also:
the mode (i.e.: {@link org.jivesoftware.smack.packet.Presence.Mode#away}), the type (i.e.: {@link org.jivesoftware.smack.packet.Presence.Type#available} )

Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
XmppRosterEventMessageSendingHandler()
           
 
Method Summary
protected  void handleMessageInternal(Message<?> message)
           
 boolean isRunning()
           
 void setMessageMapper(OutboundMessageMapper<org.jivesoftware.smack.packet.Presence> messageMapper)
          the MessageMapper is responsible for converting outbound Messages into status updates of type Presence
 void setXmppConnection(org.jivesoftware.smack.XMPPConnection xmppConnection)
           
 void start()
           
 void stop()
           
 
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, onInit, 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.integration.context.NamedComponent
getComponentName
 

Constructor Detail

XmppRosterEventMessageSendingHandler

public XmppRosterEventMessageSendingHandler()
Method Detail

setXmppConnection

public void setXmppConnection(org.jivesoftware.smack.XMPPConnection xmppConnection)

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Lifecycle

start

public void start()
Specified by:
start in interface Lifecycle

stop

public void stop()
Specified by:
stop in interface Lifecycle

setMessageMapper

public void setMessageMapper(OutboundMessageMapper<org.jivesoftware.smack.packet.Presence> messageMapper)
the MessageMapper is responsible for converting outbound Messages into status updates of type Presence

Parameters:
messageMapper - mapper for the message into a Presence instance

handleMessageInternal

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