org.springframework.integration.xmpp.presence
Class XmppRosterEventMessageSendingHandler
java.lang.Object
org.springframework.integration.xmpp.presence.XmppRosterEventMessageSendingHandler
- All Implemented Interfaces:
- Lifecycle, MessageHandler
public class XmppRosterEventMessageSendingHandler
- extends Object
- implements MessageHandler, 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
- Author:
- Josh Long
- 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} )
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmppRosterEventMessageSendingHandler
public XmppRosterEventMessageSendingHandler()
setXmppConnection
public void setXmppConnection(org.jivesoftware.smack.XMPPConnection xmppConnection)
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 message being sent failure to send that
message will result in a MessageDeliveryException
.
- Specified by:
handleMessage
in interface MessageHandler
- Parameters:
message
- the message to be handled
- Throws:
MessageRejectedException
- if the handler doesn't select these
types of messages
MessageHandlingException
- when something went wrong during the
handling
MessageDeliveryException
- when this handler failed to deliver the
reply related to the handling of the message
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
Copyright © 2010. All Rights Reserved.