|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.spark.SessionManager
public final class SessionManager
This manager is responsible for the handling of the XMPPConnection used within Spark. This is used for the changing of the users presence, the handling of connection errors and the ability to add presence listeners and retrieve the connection used in Spark.
Constructor Summary | |
---|---|
SessionManager()
|
Method Summary | |
---|---|
void |
addPresenceListener(PresenceListener listener)
Adds a PresenceListener to Spark. |
void |
changePresence(org.jivesoftware.smack.packet.Presence presence)
Update the current availability of the user |
void |
connectionClosed()
Notify agent that the connection has been closed. |
void |
connectionClosedOnError(java.lang.Exception ex)
Notify agent the connection was closed due to an exception. |
java.lang.String |
getBareAddress()
Returns the users bare address. |
org.jivesoftware.smack.XMPPConnection |
getConnection()
Returns the XMPPConnection used for this session. |
org.jivesoftware.smackx.packet.DiscoverItems |
getDiscoveredItems()
Returns the Discovered Items. |
java.lang.String |
getJID()
Returns the jid of the Spark user. |
java.lang.String |
getPassword()
Return the password associated with this session. |
org.jivesoftware.smackx.PrivateDataManager |
getPersonalDataManager()
Returns the PrivateDataManager responsible for handling all private data for individual agents. |
java.lang.String |
getServerAddress()
Returns the host for this connection. |
java.lang.String |
getUsername()
Return the username associated with this session. |
void |
initializeSession(org.jivesoftware.smack.XMPPConnection connection,
java.lang.String username,
java.lang.String password)
Initializes session. |
void |
reconnectingIn(int i)
|
void |
reconnectionFailed(java.lang.Exception exception)
|
void |
reconnectionSuccessful()
|
void |
removePresenceListener(PresenceListener listener)
Remove a PresenceListener from Spark. |
void |
setConnection(org.jivesoftware.smack.XMPPConnection con)
|
void |
setJID(java.lang.String jid)
Sets the jid of the current Spark user. |
void |
setServerAddress(java.lang.String address)
Set the server address |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionManager()
Method Detail |
---|
public void initializeSession(org.jivesoftware.smack.XMPPConnection connection, java.lang.String username, java.lang.String password)
connection
- the XMPPConnection used in this session.username
- the agents username.password
- the agents password.public org.jivesoftware.smack.XMPPConnection getConnection()
public org.jivesoftware.smackx.PrivateDataManager getPersonalDataManager()
public java.lang.String getServerAddress()
public void setServerAddress(java.lang.String address)
address
- the address of the server.public void connectionClosedOnError(java.lang.Exception ex)
connectionClosedOnError
in interface org.jivesoftware.smack.ConnectionListener
ex
- the Exception that took place.public void connectionClosed()
connectionClosed
in interface org.jivesoftware.smack.ConnectionListener
public java.lang.String getUsername()
public java.lang.String getPassword()
public void changePresence(org.jivesoftware.smack.packet.Presence presence)
presence
- the current presence of the user.public java.lang.String getJID()
public void setJID(java.lang.String jid)
jid
- the jid of the current Spark user.public void addPresenceListener(PresenceListener listener)
PresenceListener
to Spark. PresenceListener's are used
to allow notification of when the Spark users changes their presence.
listener
- the listener.public void removePresenceListener(PresenceListener listener)
PresenceListener
from Spark.
listener
- the listener.public java.lang.String getBareAddress()
public org.jivesoftware.smackx.packet.DiscoverItems getDiscoveredItems()
public void setConnection(org.jivesoftware.smack.XMPPConnection con)
public void reconnectingIn(int i)
reconnectingIn
in interface org.jivesoftware.smack.ConnectionListener
public void reconnectionSuccessful()
reconnectionSuccessful
in interface org.jivesoftware.smack.ConnectionListener
public void reconnectionFailed(java.lang.Exception exception)
reconnectionFailed
in interface org.jivesoftware.smack.ConnectionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |