Class SchedulerSession

java.lang.Object
com.denodo.scheduler.client.security.SchedulerSession
All Implemented Interfaces:
Serializable

public class SchedulerSession extends Object implements Serializable
Provides a way to identify a user across more than one request and to store information about that user.
Since:
8.0
See Also:
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Returns a string containing the unique identifier assigned to this session.
      Returns:
      a string specifying the identifier assigned to this session
    • isLocalAuth

      public boolean isLocalAuth()
      Returns true if this session belongs to a local Scheduler user; false otherwise.
      Returns:
      a boolean specifying if the user that owns this session is a local Scheduler user or not (authenticated against a VDP server)
      Throws:
      IllegalStateException - if this method is called on an invalidated session
    • getUserType

      public Context.UserType getUserType()
      Returns:
      the userType
    • getCreationTime

      public long getCreationTime()
      Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.
      Returns:
      a long specifying when this session was created, expressed in milliseconds since 1/1/1970 GMT.
      Throws:
      IllegalStateException - if this method is called on an invalidated session
    • getAttributeNames

      public Enumeration<String> getAttributeNames()
      Returns an Enumeration of String objects containing the names of all the objects bound to this session.
      Returns:
      an Enumeration of String objects specifying the names of all the objects bound to this session
      Throws:
      IllegalStateException - if this method is called on an invalidated session
    • getAttribute

      public Object getAttribute(String name)
      Returns the object bound with the specified name in this session, or null if no object is bound under the name.
      Parameters:
      name - a string specifying the name of the object
      Returns:
      the object with the specified name
      Throws:
      IllegalStateException - if this method is called on an invalidated session
    • setAttribute

      public void setAttribute(String name, Object value)
      Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced. If the value passed in is null, this has the same effect as calling removeAttribute(String).
      Parameters:
      name - the name to which the object is bound; cannot be null
      value - the object to be bound
      Throws:
      IllegalStateException - if this method is called on an invalidated session
    • removeAttribute

      public Object removeAttribute(String name)
      Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.
      Parameters:
      name - the name of the object to remove from this session
      Throws:
      IllegalStateException - if this method is called on an invalidated session
    • invalidate

      public void invalidate()
      Invalidates this session and unbinds any objects bound to it.
      Throws:
      IllegalStateException - if this method is called on an already invalidated session
    • isBatchedMode

      public boolean isBatchedMode()
      Returns if the session mode is batched.
      Returns:
      true when the session is batched.
    • isNormalMode

      public boolean isNormalMode()
      Returns if the session mode is normal.
      Returns:
      true when the session is not batched.
    • setBatchedMode

      public void setBatchedMode()
    • setNormalMode

      public void setNormalMode()