|
Jive Messenger 2.2.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.messenger.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 AuthToken |
authToken
The authentication token for this session. |
protected static String |
CHARSET
The utf-8 charset for decoding and encoding Jabber packet streams. |
protected Connection |
conn
The connection that this session represents. |
protected SessionManager |
sessionManager
|
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(String serverName,
Connection connection,
StreamID streamID)
Creates a session with an underlying connection and permission protection. |
Method Summary | |
---|---|
JID |
getAddress()
Obtain the address of the user. |
Connection |
getConnection()
Returns the connection associated with this Session. |
Date |
getCreationDate()
Obtain the date the session was created. |
Date |
getLastActiveDate()
Obtain the time the session last had activity. |
long |
getNumClientPackets()
Obtain the number of packets sent from the client to the server. |
long |
getNumServerPackets()
Obtain the number of packets sent from the server to the client. |
String |
getServerName()
Obtain the name of the server this session belongs to. |
int |
getStatus()
Obtain the current status of this session. |
StreamID |
getStreamID()
Obtain the stream ID associated with this sesison. |
void |
incrementClientPacketCount()
Obtain the number of packets sent from the client to the server. |
void |
incrementServerPacketCount()
Obtain the number of packets sent from the server to the client. |
void |
setAddress(JID address)
Sets the new address of this session. |
void |
setStatus(int status)
Set the new status of this session. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jivesoftware.messenger.ChannelHandler |
---|
process |
Field Detail |
---|
protected static 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
protected AuthToken authToken
protected SessionManager sessionManager
Constructor Detail |
---|
public Session(String serverName, Connection connection, StreamID streamID)
connection
- The connection we are proxyingMethod Detail |
---|
public JID getAddress()
getAddress
in interface RoutableChannelHandler
public void setAddress(JID address)
public Connection getConnection()
public int getStatus()
public void setStatus(int status)
status
- The new status code for this sessionpublic StreamID getStreamID()
public String getServerName()
public Date getCreationDate()
public Date getLastActiveDate()
public void incrementClientPacketCount()
public void incrementServerPacketCount()
public long getNumClientPackets()
public long getNumServerPackets()
public String toString()
toString
in class Object
|
Jive Messenger 2.2.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |