Class SchedulerSession
java.lang.Object
com.denodo.scheduler.client.security.SchedulerSession
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) Returns the object bound with the specified name in this session, or null if no object is bound under the name.Returns an Enumeration of String objects containing the names of all the objects bound to this session.longReturns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.getId()Returns a string containing the unique identifier assigned to this session.voidInvalidates this session and unbinds any objects bound to it.booleanReturns if the session mode is batched.booleanReturnstrueif this session belongs to a local Scheduler user;falseotherwise.booleanReturns if the session mode is normal.removeAttribute(String name) Removes the object bound with the specified name from this session.voidsetAttribute(String name, Object value) Binds an object to this session, using the name specified.voidvoid
-
Constructor Details
-
SchedulerSession
-
-
Method Details
-
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()Returnstrueif this session belongs to a local Scheduler user;falseotherwise.- 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
- 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
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
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
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 isnull, this has the same effect as callingremoveAttribute(String).- Parameters:
name- the name to which the object is bound; cannot be nullvalue- the object to be bound- Throws:
IllegalStateException- if this method is called on an invalidated session
-
removeAttribute
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:
truewhen the session is batched.
-
isNormalMode
public boolean isNormalMode()Returns if the session mode is normal.- Returns:
truewhen the session is not batched.
-
setBatchedMode
public void setBatchedMode() -
setNormalMode
public void setNormalMode()
-