|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Server.Session.Session
public class Session
This class is uses to save information about a client sessions.
For further information about JPIP sessions, see ISO/IEC 15444-9 section B.2
| Field Summary | |
|---|---|
long |
DEFAULT_EXPIRATION_TIME
The default expiration time. |
private long |
expirationTime
Expiration time of the session. |
private Mutex |
mutex
Is a mutex to lock the object when a thread is setting some attribute. |
private int |
returnType
Definition in ServerControlField.type |
private java.util.ArrayList<SessionTarget> |
targets
A list of logical targets that belongs to this session. |
| Constructor Summary | |
|---|---|
Session()
Constructor. |
|
| Method Summary | |
|---|---|
void |
closeChannel(java.lang.String cid)
Closes a channel. |
boolean |
contains(java.lang.String cid)
Checks if the channel cid belongs to this session. |
java.lang.String |
createSession(int returnType,
java.lang.String transport)
Creates a new session. |
ServerCache |
getCache(java.lang.String cid)
Returns the cache which is associated with the channel. |
int |
getReturnType()
Returns the returnType attribute. |
java.lang.String |
getTid(java.lang.String cid)
See SessionTarget.getTid(). |
private int |
indexOf(java.lang.String cid)
Returns the index of the session which the channel cid
belongs to. |
boolean |
isExpired()
Checks whether the session has expired or it has not. |
void |
list(java.io.PrintStream out)
Prints this Session out to the specified output stream. |
void |
remove()
Removes the session. |
void |
setCache(java.lang.String cid,
ServerCache cache)
|
void |
setTid(java.lang.String cid,
java.lang.String tid)
See SessionTarget.setTid(String). |
java.lang.String |
toString()
|
private void |
updateExpirationTime()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Mutex mutex
private int returnType
ServerControlField.type
private java.util.ArrayList<SessionTarget> targets
private long expirationTime
public final long DEFAULT_EXPIRATION_TIME
| Constructor Detail |
|---|
public Session()
| Method Detail |
|---|
public java.lang.String createSession(int returnType,
java.lang.String transport)
returnType - transport -
public boolean contains(java.lang.String cid)
cid belongs to this session.
cid - the unique channel identifier.
true if the channel belongs to this session.
Otherwise, returns false.public void closeChannel(java.lang.String cid)
cid - the unique channel identifier.public void remove()
public int getReturnType()
returnType attribute.
returnType attribute.
public void setTid(java.lang.String cid,
java.lang.String tid)
SessionTarget.setTid(String).
cid - the channel identifier.tid - the target identifier.public java.lang.String getTid(java.lang.String cid)
SessionTarget.getTid().
cid - the channel identifier.
public void setCache(java.lang.String cid,
ServerCache cache)
cid - cache - public ServerCache getCache(java.lang.String cid)
cid -
public boolean isExpired()
true if the session has expired. Otherwise,
returns false.public java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.private int indexOf(java.lang.String cid)
cid
belongs to. If the channel is not in the sessions, returns -1
.
cid - the channel identifier.
targets, or
-1 if the channel is not the list.private void updateExpirationTime()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||