Spring Integration

org.springframework.integration.xmpp.presence
Class XmppRosterEventMessageDrivenEndpoint

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.xmpp.presence.XmppRosterEventMessageDrivenEndpoint
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, Lifecycle, Phased, SmartLifecycle, NamedComponent

public class XmppRosterEventMessageDrivenEndpoint
extends AbstractEndpoint
implements Lifecycle

Describes an endpoint that is able to login as usual with a XmppConnectionFactory and then emit Messages when a particular event happens to the logged in users Roster. We try and generically propagate these events. In practical terms, there are a few events worth being notified of:

Since:
2.0
Author:
Josh Long

Constructor Summary
XmppRosterEventMessageDrivenEndpoint()
           
 
Method Summary
protected  void doStart()
          Subclasses must implement this method with the start behavior.
protected  void doStop()
          Subclasses must implement this method with the stop behavior.
protected  void forwardRosterEventMessage(org.jivesoftware.smack.packet.Presence presence)
          Called whenever an event happesn related to the Roster
protected  void onInit()
          Subclasses may implement this for initialization logic.
 void setMessageMapper(InboundMessageMapper<org.jivesoftware.smack.packet.Presence> messageMapper)
           
 void setRequestChannel(MessageChannel requestChannel)
           
 void setXmppConnection(org.jivesoftware.smack.XMPPConnection xmppConnection)
          This will be injected or configured via a xmpp-connection-factory element.
 
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
 
Methods inherited from interface org.springframework.context.Lifecycle
isRunning, start, stop
 

Constructor Detail

XmppRosterEventMessageDrivenEndpoint

public XmppRosterEventMessageDrivenEndpoint()
Method Detail

setXmppConnection

public void setXmppConnection(org.jivesoftware.smack.XMPPConnection xmppConnection)
This will be injected or configured via a xmpp-connection-factory element.

Parameters:
xmppConnection - the connection

setRequestChannel

public void setRequestChannel(MessageChannel requestChannel)
Parameters:
requestChannel - the channel on which the inbound message should be sent

doStart

protected void doStart()
Description copied from class: AbstractEndpoint
Subclasses must implement this method with the start behavior. This method will be invoked while holding the AbstractEndpoint.lifecycleLock.

Specified by:
doStart in class AbstractEndpoint

doStop

protected void doStop()
Description copied from class: AbstractEndpoint
Subclasses must implement this method with the stop behavior. This method will be invoked while holding the AbstractEndpoint.lifecycleLock.

Specified by:
doStop in class AbstractEndpoint

onInit

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

Overrides:
onInit in class IntegrationObjectSupport
Throws:
Exception

forwardRosterEventMessage

protected void forwardRosterEventMessage(org.jivesoftware.smack.packet.Presence presence)
Called whenever an event happesn related to the Roster

Parameters:
presence - the Presence object representing the new state (optional)

setMessageMapper

public void setMessageMapper(InboundMessageMapper<org.jivesoftware.smack.packet.Presence> messageMapper)

Spring Integration

Copyright © 2010. All Rights Reserved.