|
Connection Manager 3.4.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.multiplexer.Session
public abstract class Session
The session represents a connection between the server and a client (c2s) or another server (s2s) as well as a connection with a component. Authentication and user accounts are associated with c2s connections while s2s has an optional authentication association but no single user user.
Obtain object managers from the session in order to access server resources.
Field Summary | |
---|---|
protected static java.lang.String |
CHARSET
The utf-8 charset for decoding and encoding Jabber packet streams. |
protected Connection |
conn
The connection that this session represents. |
static StreamIDFactory |
idFactory
|
static int |
MAJOR_VERSION
Version of the XMPP spec supported as MAJOR_VERSION.MINOR_VERSION (e.g. |
static int |
MINOR_VERSION
|
protected int |
status
The current session status. |
static int |
STATUS_AUTHENTICATED
|
static int |
STATUS_CLOSED
|
static int |
STATUS_CONNECTED
|
static int |
STATUS_STREAMING
|
Constructor Summary | |
---|---|
Session(java.lang.String serverName,
Connection connection,
java.lang.String streamID)
Creates a session with an underlying connection and permission protection. |
Method Summary | |
---|---|
static void |
addSession(java.lang.String streamID,
Session session)
|
abstract void |
close()
Indicate the server that the session has been closed. |
abstract void |
close(boolean isServerShuttingDown)
|
static void |
closeAll()
Closes connections of connected clients since the server or the connection manager is being shut down. |
protected static int[] |
decodeVersion(java.lang.String version)
|
abstract void |
deliver(org.dom4j.Element stanza)
|
abstract java.lang.String |
getAvailableStreamFeatures()
Returns a text with the available stream features. |
java.util.Date |
getCreationDate()
Obtain the date the session was created. |
java.lang.String |
getServerName()
Obtain the name of the server this session belongs to. |
static Session |
getSession(java.lang.String streamID)
Returns the session whose stream ID matches the specified stream ID. |
int |
getStatus()
Obtain the current status of this session. |
java.lang.String |
getStreamID()
Obtain the stream ID associated with this sesison. |
abstract boolean |
isClosed()
|
static void |
removeSession(java.lang.String streamID)
|
void |
setStatus(int status)
Set the new status of this session. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAJOR_VERSION
public static final int MINOR_VERSION
protected static java.lang.String CHARSET
public static final int STATUS_CLOSED
public static final int STATUS_CONNECTED
public static final int STATUS_STREAMING
public static final int STATUS_AUTHENTICATED
protected int status
protected Connection conn
public static StreamIDFactory idFactory
Constructor Detail |
---|
public Session(java.lang.String serverName, Connection connection, java.lang.String streamID)
connection
- The connection we are proxyingMethod Detail |
---|
public static void addSession(java.lang.String streamID, Session session)
public static void removeSession(java.lang.String streamID)
public static Session getSession(java.lang.String streamID)
streamID
- the stream ID of the session to look for.
public static void closeAll()
public int getStatus()
public void setStatus(int status)
status
- The new status code for this sessionpublic java.lang.String getStreamID()
public java.lang.String getServerName()
public java.util.Date getCreationDate()
public abstract java.lang.String getAvailableStreamFeatures()
public abstract void close()
public abstract void close(boolean isServerShuttingDown)
public abstract void deliver(org.dom4j.Element stanza)
public java.lang.String toString()
toString
in class java.lang.Object
protected static int[] decodeVersion(java.lang.String version)
public abstract boolean isClosed()
|
Connection Manager 3.4.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |