Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.fdk.impl
Class FdkUserSessionImpl

    java.lang.Object
      oracle.ifs.fdk.FdkSession
          oracle.ifs.fdk.impl.FdkSessionImpl
              oracle.ifs.fdk.impl.FdkUserSessionImpl

All Implemented Interfaces:
  LogInfo

    public final class FdkUserSessionImpl

extends FdkSessionImpl

The implementation of a connected user session. See the documentation for `FdkSession`.

Field Summary

Fields inherited from class oracle.ifs.fdk.FdkSession
`m_CurrentRequestThread, m_Tag`

Method Summary
`void` | `beginRequest(boolean wait, long timeout, java.lang.String tag)` Notifies the session that a new request has begun.
`long` | `beginTransaction()` Begins a transaction on this session.
`void` | `commitTransaction(long id)` Commits a transaction started by calling `beginTransaction()`.
`void` | `disconnectNotify()` Disconnects this user session.
`boolean` | `endRequest()` Notifies the session that the request has ended.
`java.lang.String` | `getDistinguishedName()` Returned the distinguished name for the authenticated user.
`long` | `getId()` Returns this session identifier.
`long` | `getLastAccessTime()` Returns the time when the last request was completed by calling `endRequest()` on the current session.
`LibrarySession` | `getLibrarySession()` Returns the `LibrarySession` associated with this user session.
`java.lang.String` | `getSessionIdentifier()` Get a String that identifies a user session.
`long` | `getSessionTimeout()` Returns the session timeout, in seconds, for this session.
`java.lang.Object` | `getState(java.lang.Object key)` Returns the value stored at the given key using `setState()`.
`java.lang.String` | `getTrustedApplicationName()` Returns the name of the trusted application or `null` if the session was not created by a truested application.
`Item` | `getUser(AttributeRequest[] attributes)` Returns the user for this session.
`java.lang.String` | `getUserIdentifier()` Get a String that identifies a user.
`java.lang.String` | `getUsername()` Returns the username for the authenticated user.
`void` | `httpBind()` Respond to a bind notification from the HttpSession
`void` | `httpUnbind()` Respond to an unbind notification from the HttpSession
`boolean` | `isAdministrationMode()` Returns true if the session is in one of the administration modes.
`boolean` | `isConnected()` Returns true if this session is connected.
`boolean` | `isGuest()` Returns true if the session is a guest/anonymous session.
`boolean` | `isRequestInProgress()` Returns true if there is a request being serviced by this session.
`boolean` | `isSystem()` Returns true if the session is a system session.
`boolean` | `isTrustedApplication()` Returns true if the session was created by a trusted application.
`void` | `popSessionMode(int mode)`
`void` | `pushSessionMode(int mode)`
`protected void` | `requestCleanup()` Request cleanup.
`void` | `rollbackTransaction(long id)` Rolls back a transaction started by calling `beginTransaction()` .
`protected void` | `rollbackTransactionStack()` Rolls back the entire transaction stack.
`void` | `setLastAccessTimeUpdate(boolean update)` Sets whether the last access time will be updated when `endRequest()` is called on the current session.
`Item` | `setSessionMode(int mode, AttributeRequest[] attributes)`
`void` | `setSessionTimeout(long timeout)` Sets the automatic session timeout for inactivity.
`void` | `setState(java.lang.Object key, java.lang.Object value)` Sets a value representing a piece of state that makes sense to the application.
`boolean` | `verifyCredential(Credential credential)` Verifies that the given credential is valid for the user represented by this session.

Methods inherited from class oracle.ifs.fdk.impl.FdkSessionImpl
`disconnect, getInternalSession, getManagersFactory, isTransactionInProgress, registerForEvents, unregisterForEvents`

Methods inherited from class oracle.ifs.fdk.FdkSession
`beginRequestCommon, getCreationTime, getCurrentSession, getTag`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### disconnectNotify

    public void disconnectNotify()
                          throws FdkException

  Description copied from class: `FdkUserSessionImpl`
  Disconnects this user session.

  Throws:
    `FdkException`

### getId

    public long getId()

  Description copied from class: `FdkSession`
  Returns this session identifier. The identifier is not persisted, it is unique in the context of a Java Virtual Machine and it may be the same between different runs of the software.

  Specified by:
    `getId` in class `FdkSession`

### isConnected

    public boolean isConnected()

  Description copied from class: `FdkSession`
  Returns true if this session is connected.

  Specified by:
    `isConnected` in class `FdkSession`

### getUser

    public Item getUser(AttributeRequest[] attributes)
                 throws FdkException

  Description copied from class: `FdkSessionImpl`
  Returns the user for this session. Optional attributes about the user can be requested.

  Specified by:
    `getUser` in class `FdkSessionImpl`
  Parameters:
    `attributes` - Optional attributes to be returned.
  Throws:
    `FdkException`

### getUsername

    public java.lang.String getUsername()

  Description copied from class: `FdkSession`
  Returns the username for the authenticated user. It is recommended that implementations cache the value so that a call to this method will not block if for example the underlying session is busy.

  Specified by:
    `getUsername` in class `FdkSession`

### getDistinguishedName

    public java.lang.String getDistinguishedName()

  Description copied from class: `FdkSession`
  Returned the distinguished name for the authenticated user. For OID users this is equivalent to the OID GUID. It is recommended that implementations cache the value so that a call to this method will not block if for example the underlying session is busy.

  Specified by:
    `getDistinguishedName` in class `FdkSession`

### isGuest

    public boolean isGuest()

  Description copied from class: `FdkSession`
  Returns true if the session is a guest/anonymous session.

  Specified by:
    `isGuest` in class `FdkSession`

### isSystem

    public boolean isSystem()

  Description copied from class: `FdkUserSessionImpl`
  Returns true if the session is a system session.

  Specified by:
    `isSystem` in class `FdkSession`

### isTrustedApplication

    public boolean isTrustedApplication()

  Description copied from class: `FdkUserSessionImpl`
  Returns true if the session was created by a trusted application.

  Specified by:
    `isTrustedApplication` in class `FdkSession`

### getTrustedApplicationName

    public java.lang.String getTrustedApplicationName()

  Description copied from class: `FdkUserSessionImpl`
  Returns the name of the trusted application or `null` if the session was not created by a truested application.

  Specified by:
    `getTrustedApplicationName` in class `FdkSession`

### verifyCredential

    public boolean verifyCredential(Credential credential)
                             throws FdkException

  Description copied from class: `FdkSession`
  Verifies that the given credential is valid for the user represented by this session. Returns `true` if the credential is valid or `false` otherwise. The method can also throw a `FdkException` if errors occur during the verification process.

  Specified by:
    `verifyCredential` in class `FdkSession`
  Parameters:
    `credential` - The credential to verify.
  Throws:
    `FdkException`

### isRequestInProgress

    public boolean isRequestInProgress()

  Description copied from class: `FdkSession`
  Returns true if there is a request being serviced by this session. See `beginRequest()` and `endRequest()`

  Specified by:
    `isRequestInProgress` in class `FdkSession`

### beginRequest

    public void beginRequest(boolean wait,
                             long timeout,
                             java.lang.String tag)
                      throws FdkException

  Description copied from class: `FdkSession`
  Notifies the session that a new request has begun. The current thread becomes the owner of this session. `endRequest()` must be called from the same thread.

  Specified by:
    `beginRequest` in class `FdkSession`
  Parameters:
    `wait` - Whether the calling thread should wait for the session to finish any existing requests or should fail right away if the session is busy. If wait is `false`, the timeout value is ignored.
    `timeout` - If the caller chooses to wait, this is the timeout in milliseconds before an error is returned if the session is still busy. If the parameter is 0, the wait is indefinite. If the timeout is -1 or any negative value the wait is defaulted to a system chosen, sensible value.
    `tag` - A tag describing the application that is currently using this session. The tag can be retrieved later on by calling `getTag()`. Must not be `null`.
  Throws:
    `FdkException`

### endRequest

    public boolean endRequest()
                       throws FdkException

  Description copied from class: `FdkSession`
  Notifies the session that the request has ended. Returns `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.

  Specified by:
    `endRequest` in class `FdkSession`
  Throws:
    `FdkException`

### requestCleanup

    protected void requestCleanup()

  Description copied from class: `FdkSession`
  Request cleanup.

  Overrides:
    `requestCleanup` in class `FdkSession`

### setSessionTimeout

    public void setSessionTimeout(long timeout)

  Description copied from class: `FdkSession`
  Sets the automatic session timeout for inactivity. A session that has a timeout greater than zero will automatically be disconnected if there is no activity for the specified number of seconds.

  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.

  Specified by:
    `setSessionTimeout` in class `FdkSession`
  Parameters:
    `timeout` - Number of seconds to set the timeout to.

### getSessionTimeout

    public long getSessionTimeout()

  Description copied from class: `FdkSession`
  Returns the session timeout, in seconds, for this session. A zero return value means the session is not timed out by this framework. Note that the return value is meaningful only if the session is fully managed by the framework as there could be external entities (such as an HttpSession) that could have their own session timeouts which would in turn trigger this session to timeout.

  Specified by:
    `getSessionTimeout` in class `FdkSession`

### setLastAccessTimeUpdate

    public void setLastAccessTimeUpdate(boolean update)

  Description copied from class: `FdkSession`
  Sets whether the last access time will be updated when `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()`.

  Specified by:
    `setLastAccessTimeUpdate` in class `FdkSession`
  Parameters:
    `update` - If `false` the last access time will not be updated, otherwise it will be updated.

### getLastAccessTime

    public long getLastAccessTime()

  Description copied from class: `FdkSession`
  Returns the time when the last request was completed by calling `endRequest()` on the current session. The time format is the same as `System.currentTimeMillis()`.

  Specified by:
    `getLastAccessTime` in class `FdkSession`

### setSessionMode

    public Item setSessionMode(int mode,
                               AttributeRequest[] attributes)
                        throws FdkException

  Throws:
    `FdkException`

### pushSessionMode

    public void pushSessionMode(int mode)
                         throws FdkException

  Throws:
    `FdkException`

### popSessionMode

    public void popSessionMode(int mode)
                        throws FdkException

  Throws:
    `FdkException`

### isAdministrationMode

    public boolean isAdministrationMode()

  Description copied from class: `FdkUserSessionImpl`
  Returns true if the session is in one of the administration modes.

### beginTransaction

    public long beginTransaction()
                          throws FdkException

  Description copied from class: `FdkSessionImpl`
  Begins a transaction on this session. The trasaction can be committed by calling `commitTransaction()` or it can be rolled back by calling `rollbackTransaction()` on this session.

  This method returns a transaction ID required to later reference this specific transaction.

  Transactions can be nested but they need to be committed or rolled back in the proper order, most recent transaction first (stack model).

  Overrides:
    `beginTransaction` in class `FdkSessionImpl`
  Throws:
    `FdkException`

### commitTransaction

    public void commitTransaction(long id)
                           throws FdkException

  Description copied from class: `FdkSessionImpl`
  Commits a transaction started by calling `beginTransaction()`.

  Overrides:
    `commitTransaction` in class `FdkSessionImpl`
  Parameters:
    `id` - The ID of the transaction (returned by `beginTransaction()`).
  Throws:
    `FdkException`

### rollbackTransaction

    public void rollbackTransaction(long id)
                             throws FdkException

  Description copied from class: `FdkSessionImpl`
  Rolls back a transaction started by calling `beginTransaction()` .

  If the ID of the transaction is less than or equal to 0, then the entire transaction stack will be rolled back at once.

  Overrides:
    `rollbackTransaction` in class `FdkSessionImpl`
  Parameters:
    `id` - The ID of the transaction (returned by `beginTransaction()`). If the ID is less than or equal to 0, then the entire transaction stack will be rolled back at once.
  Throws:
    `FdkException`

### rollbackTransactionStack

    protected void rollbackTransactionStack()

  Description copied from class: `FdkUserSessionImpl`
  Rolls back the entire transaction stack.

  Overrides:
    `rollbackTransactionStack` in class `FdkSessionImpl`

### setState

    public void setState(java.lang.Object key,
                         java.lang.Object value)
                  throws FdkException

  Description copied from class: `FdkSession`
  Sets a value representing a piece of state that makes sense to the application. The value can be retrieved using `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.

  Specified by:
    `setState` in class `FdkSession`
  Parameters:
    `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.
  Throws:
    `FdkException`

### getState

    public java.lang.Object getState(java.lang.Object key)
                              throws FdkException

  Description copied from class: `FdkSession`
  Returns the value stored at the given key using `setState()`. See the documentation of `setState()`.

  Specified by:
    `getState` in class `FdkSession`
  Parameters:
    `key` - The key to retrieve the value for.
  Throws:
    `FdkException`

### getLibrarySession

    public LibrarySession getLibrarySession()
                                     throws FdkException

  Description copied from class: `FdkSessionImpl`
  Returns the `LibrarySession` associated with this user session.

  WARNING!

  This method should not be called from client code, except for exceptional circumstances where the caller understands the implications of using the `LibrarySession` directly and opts out of using the framework.

  If you need to use this method, please check with the developers of the framework for possible alternate ways of achieving the same result.

  Specified by:
    `getLibrarySession` in class `FdkSessionImpl`
  Throws:
    `FdkException`

### getUserIdentifier

    public java.lang.String getUserIdentifier()

  Description copied from interface: `LogInfo`
  Get a String that identifies a user. The user identifier can be used to track the related log recoreds across multiple requests.

  Returns:
    a string that uniquely identifies a user

### getSessionIdentifier

    public java.lang.String getSessionIdentifier()

  Description copied from interface: `LogInfo`
  Get a String that identifies a user session. The session identifier can be used to track related log entries across multiple requests.

  Returns:
    a string that uniquely identifies a user session

### httpUnbind

    public void httpUnbind()

  Description copied from class: `FdkSession`
  Respond to an unbind notification from the HttpSession

  Overrides:
    `httpUnbind` in class `FdkSession`

### httpBind

    public void httpBind()

  Description copied from class: `FdkSession`
  Respond to a bind notification from the HttpSession

  Overrides:
    `httpBind` in class `FdkSession`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD