org.exoplatform.services.xmpp.connection.impl
Class XMPPMessenger

java.lang.Object
  extended by org.exoplatform.services.xmpp.connection.impl.XMPPMessenger

public class XMPPMessenger
extends java.lang.Object

Created by The eXo Platform SAS.

Version:
$Id: $
Author:
Vitaly Parfonov

Field Summary
protected static org.apache.commons.logging.Log LOGGER
          Logger.
 
Constructor Summary
XMPPMessenger(org.exoplatform.container.xml.InitParams params)
           
 
Method Summary
static long getCloseSessionTime()
           
static org.jivesoftware.smack.ConnectionConfiguration getConnectionConfiguration()
           
static int getDisconnectTime()
           
 XMPPSession getSession(java.lang.String username)
          Get XMPP session for given user.
 UIStateSession getUISateSession(java.lang.String username)
           
 void login(java.lang.String username, java.lang.String password, UserInfoService userInfoService, org.exoplatform.ws.frameworks.cometd.transport.ContinuationServiceDelegate delegate, HistoryImpl history, java.util.ResourceBundle rb)
          Connect to XMPP server.
 void logout(java.lang.String username)
          Close XMPP connection for given user and remove this session from the sessions list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final org.apache.commons.logging.Log LOGGER
Logger.

Constructor Detail

XMPPMessenger

public XMPPMessenger(org.exoplatform.container.xml.InitParams params)
Parameters:
params - the initParms
Method Detail

getConnectionConfiguration

public static org.jivesoftware.smack.ConnectionConfiguration getConnectionConfiguration()
Returns:
default configuration for XMPP connection.

getCloseSessionTime

public static long getCloseSessionTime()
Returns:
the close session timeout

getDisconnectTime

public static int getDisconnectTime()
Returns:
the disconnect timeout

login

public void login(java.lang.String username,
                  java.lang.String password,
                  UserInfoService userInfoService,
                  org.exoplatform.ws.frameworks.cometd.transport.ContinuationServiceDelegate delegate,
                  HistoryImpl history,
                  java.util.ResourceBundle rb)
           throws org.jivesoftware.smack.XMPPException
Connect to XMPP server.

Parameters:
username - the user name.
password - the password.
Throws:
org.jivesoftware.smack.XMPPException - the XMPPException

logout

public void logout(java.lang.String username)
Close XMPP connection for given user and remove this session from the sessions list.

Parameters:
username - the user name.

getSession

public XMPPSession getSession(java.lang.String username)
Get XMPP session for given user.

Parameters:
username - the user name.
Returns:
the XMPPSession or null if user is not registered on the server.

getUISateSession

public UIStateSession getUISateSession(java.lang.String username)
Parameters:
username - the user name
Returns:
the UIStateSession or null if user is not registered on the server.


Copyright © 2011 eXo Platform SAS. All Rights Reserved.