Class HttpSessionFacade
java.lang.Object
org.eclipse.dirigible.api.v3.http.HttpSessionFacade
- All Implemented Interfaces:
IScriptingFacade
public class HttpSessionFacade extends Object implements IScriptingFacade
Java facade for working with HttpSession
-
Constructor Summary
Constructors Constructor Description HttpSessionFacade() -
Method Summary
Modifier and Type Method Description static StringgetAttribute(String arg0)Returns the object bound to the specified namestatic String[]getAttributeNames()Returns the attribute names.static StringgetAttributeNamesJson()Returns the attribute names.static longgetCreationTime()Returns the time the session was createdstatic StringgetId()Returns the id of the sessionstatic longgetLastAccessedTime()Returns the last accessed time.static intgetMaxInactiveInterval()Returns the max inactive interval.static voidinvalidate()Invalidates the sessionstatic booleanisNew()Checks if the session is newstatic booleanisValid()Checks if there is a session associated with the current thread contextstatic voidremoveAttribute(String arg0)Removes the attribute.static voidsetAttribute(String arg0, String arg1)Sets the attribute.static voidsetMaxInactiveInterval(int arg0)Sets the max inactive interval.static voidsetMaxInactiveInterval(Double arg0)Sets the max inactive interval.
-
Constructor Details
-
HttpSessionFacade
public HttpSessionFacade()
-
-
Method Details
-
isValid
public static final boolean isValid()Checks if there is a session associated with the current thread context- Returns:
- true, if is valid
-
getAttribute
Returns the object bound to the specified name- Parameters:
arg0- the name- Returns:
- the attribute
-
getAttributeNames
Returns the attribute names.- Returns:
- the attribute names
-
getAttributeNamesJson
Returns the attribute names.- Returns:
- the attribute names
-
getCreationTime
public static final long getCreationTime()Returns the time the session was created- Returns:
- the creation time
-
getId
Returns the id of the session- Returns:
- the id
-
getLastAccessedTime
public static final long getLastAccessedTime()Returns the last accessed time.- Returns:
- the last accessed time
-
getMaxInactiveInterval
public static final int getMaxInactiveInterval()Returns the max inactive interval.- Returns:
- the max inactive interval
-
invalidate
public static final void invalidate()Invalidates the session -
isNew
public static final boolean isNew()Checks if the session is new- Returns:
- true, if is new
-
setAttribute
Sets the attribute.- Parameters:
arg0- the namearg1- the value
-
removeAttribute
Removes the attribute.- Parameters:
arg0- the name of the attribute
-
setMaxInactiveInterval
public static final void setMaxInactiveInterval(int arg0)Sets the max inactive interval.- Parameters:
arg0- the new max inactive interval
-
setMaxInactiveInterval
Sets the max inactive interval.- Parameters:
arg0- the new max inactive interval
-