|
Oracle® Content Services Web Services Java API Reference 10g Release 1 (10.1.1) B19047-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ifs.fdk.FdkSession
Represents an authenticated user session.
Field Summary | |
protected java.lang.Thread |
m_CurrentRequestThread |
Constructor Summary | |
FdkSession() |
Method Summary | |
void |
beginRequest() Notifies the session that a new request has begun. |
abstract boolean |
endRequest() Notifies the session that the request has ended. |
static FdkSession |
getCurrentSession() Returns the current session for the ongoing request, or null if no session is available or cannot be determined. |
abstract java.lang.String |
getDistinguishedName() Returned the distinguished name for the authenticated user. |
abstract long |
getId() Returns this session identifier. |
abstract long |
getLastAccessTime() Returns the time when the last request was completed by calling endRequest() on the current session. |
abstract long |
getSessionTimeout() Returns the session timeout, in seconds, for this session. |
abstract java.lang.Object |
getState(java.lang.Object key) Returns the value stored at the given key using setState() . |
abstract java.lang.String |
getUsername() Returns the username for the authenticated user. |
abstract boolean |
isConnected() Returns true if this session is connected. |
abstract boolean |
isGuest() Returns true if the session is a guest/anonymous session. |
abstract boolean |
isRequestInProgress() Returns true if there is a request being serviced by this session. |
abstract void |
registerForEvents(FdkSessionListener listener) Registers a listener for events that may occur on this session. |
protected void |
requestCleanup() Request cleanup. |
abstract void |
setLastAccessTimeUpdate(boolean update) Sets whether the last access time will be updated when endRequest() is called on the current session. |
abstract void |
setSessionTimeout(long timeout) Sets the automatic session timeout for inactivity. |
abstract void |
setState(java.lang.Object key, java.lang.Object value) Sets a value representing a piece of state that makes sense to the application. |
abstract boolean |
unregisterForEvents(FdkSessionListener listener) Unregisters a previously registered listener. |
abstract boolean |
verifyCredential(oracle.ifs.common.Credential credential) Verifies that the given credential is valid for the user represented by this session. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.http.HttpSessionBindingListener |
valueBound, valueUnbound |
Methods inherited from interface oracle.ifs.common.logging.LogInfo |
getSessionIdentifier, getUserIdentifier |
Field Detail |
protected java.lang.Thread m_CurrentRequestThread
Constructor Detail |
public FdkSession()
Method Detail |
public void beginRequest() throws FdkException
endRequest()
must be called from the same thread.FdkException
public abstract boolean endRequest() throws FdkException
false
if there were no outstanding requests on the session or the current thread did not own the session. The caller may interpret it as an error or just ignore it, depending on its implementation.FdkException
public static FdkSession getCurrentSession()
public abstract java.lang.String getDistinguishedName()
public abstract long getId()
public abstract long getLastAccessTime()
endRequest()
on the current session. The time format is the same as System.currentTimeMillis()
.public abstract long getSessionTimeout()
public abstract java.lang.Object getState(java.lang.Object key) throws FdkException
setState()
. See the documentation of setState()
.key
- The key to retrieve the value for.FdkException
public abstract java.lang.String getUsername()
public abstract boolean isConnected()
public abstract boolean isGuest()
public abstract boolean isRequestInProgress()
beginRequest()
and endRequest()
public abstract void registerForEvents(FdkSessionListener listener)
FdkSessionListener
interface.listener
- The listener to register. It must imlpement the FdkSessionListener
interface.protected void requestCleanup()
public abstract void setLastAccessTimeUpdate(boolean update)
endRequest()
is called on the current session. This is useful behavior for requests that are not sent by the true end-user but rather by a polling process for example.
Note that the behavior is changed on a per request basis, the default behavior if the method is not called during a request is to always update the last access time and the behavior is reset to the default when a request is completed by calling endRequest()
.
update
- If false
the last access time will not be updated, otherwise it will be updated.public abstract void setSessionTimeout(long timeout)
In addition, if the timeout is greater than zero, the session will not be disconnected when it gets the unbind even from the HttpSession, as it is assumed it is being managed by a different entity.
timeout
- Number of seconds to set the timeout to.public abstract void setState(java.lang.Object key, java.lang.Object value) throws FdkException
getState()
.
It is recommended that applications store only one object as their state. The object can be a Map that contains other pieces of state.
key
- The key that identifies the piece of state. The namespace for the key is not specified. It is recommended that a package-like key name be used in order to avoid potential conflicts.value
- The value to store at the given key. If null
, the key will be removed.FdkException
public abstract boolean unregisterForEvents(FdkSessionListener listener)
false
is returned.listener
- The listener to register. It must imlpement the FdkSessionListener
interface.public abstract boolean verifyCredential(oracle.ifs.common.Credential credential) throws FdkException
true
if the credential is valid or false
otherwise. The method can also throw a FdkException
if errors occur during the verification process.credential
- The credential to verify.FdkException
|
Oracle® Content Services Web Services Java API Reference 10g Release 1 (10.1.1) B19047-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |