|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Session
Interface that stores the state of the connection to the server. It is also where the
ServiceManager
can be found. A session is created and initialized by calling
SessionFactory.newSession(URL, Credentials)
. Once you have created a session,
you can use isValid()
to tell whether the session is still active. A session
can become invalid due to a server-side timeout, or due to a call to invalidate()
.
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Get an object that was previously placed in the session by a call to setAttribute(String, Object) , null if the object isn't in the session. |
ServiceManager |
getServiceManager()
Get the single service manager for this session. |
void |
invalidate()
Invalidate the session and free any server-side resources being held. |
boolean |
isValid()
Check whether this is session is still valid. |
java.lang.Object |
removeAttribute(java.lang.String name)
Remove the given object from the session. |
java.lang.Object |
setAttribute(java.lang.String name,
java.lang.Object value)
Set an object on the sesion that can later be retrieved using getAttribute(String) . |
Method Detail |
---|
boolean isValid()
invalidate()
.
void invalidate()
ServiceManager getServiceManager()
java.lang.Object getAttribute(java.lang.String name)
setAttribute(String, Object)
, null
if the object isn't in the session.
name
- name that the attribute set with
null
if the object doesn't existjava.lang.Object setAttribute(java.lang.String name, java.lang.Object value)
getAttribute(String)
.
If an object of the same name is already bound to the session, the object is replaced, and
the previous value is returned from this method.
name
- name of the objectvalue
- the object itself
null
if no object with the given name was in the sessionjava.lang.Object removeAttribute(java.lang.String name)
name
- name of the object to remove.
null
if no object was in the session with
the given name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |