Class ClientReqSession
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.clientcomm.ClientReqSession
-
- All Implemented Interfaces:
javax.servlet.http.HttpSession
public abstract class ClientReqSession extends java.lang.Object implements javax.servlet.http.HttpSession
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SESSION_CLIENT_JVM_VERSION
Holds the Java Version of the client JVMstatic java.lang.String
SESSION_IS_DESIGNER
true
if the session belongs to a designer.static java.lang.String
SESSION_MEM_USED
static java.lang.String
SESSION_PROJECT_NAME
The name (a String) of the project that this session has loadedstatic java.lang.String
SESSION_REMOTE_ADDR
This is the address of the client, a String, as returned byServletRequest.getRemoteAddr()
static java.lang.String
SESSION_REMOTE_HOST
This holds the self-reported "hostname" (a String) that the client sent when it first logged in.static java.lang.String
SESSION_TIMEZONE
Holds theTimeZone
that the client JVM is instatic java.lang.String
SESSION_USER
TheUser
the session belongs to.static java.lang.String
SESSION_USERNAME
The username (String) of theUser
the session belongs to.
-
Constructor Summary
Constructors Constructor Description ClientReqSession()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addNotification(java.lang.String moduleId, java.lang.String messageType, java.io.Serializable message)
Adds a notification message that will be sent down to this session's client and delivered as a PushNotification.static boolean
exists()
Checks if theSession
threadlocal is set in this threadstatic ClientReqSession
get()
Get the session for the calling thread.abstract java.util.Locale
getLocale()
abstract java.lang.String
getPublicId()
Returns a unique but irreversible hash of the true idabstract int
getScope()
Returns this client's ApplicationScope, either Client or Designerboolean
isDesigner()
abstract boolean
isValid()
protected static void
set(ClientReqSession session)
Sets session for calling thread.abstract void
setMessageFilter(java.lang.String name, MessageFilter filter)
Sets a named filter on this session.protected static void
unset()
Clears the session for calling thread.-
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.HttpSession
getAttribute, getAttributeNames, getCreationTime, getId, getLastAccessedTime, getMaxInactiveInterval, getServletContext, getSessionContext, getValue, getValueNames, invalidate, isNew, putValue, removeAttribute, removeValue, setAttribute, setMaxInactiveInterval
-
-
-
-
Field Detail
-
SESSION_IS_DESIGNER
public static final java.lang.String SESSION_IS_DESIGNER
true
if the session belongs to a designer.- See Also:
- Constant Field Values
-
SESSION_USERNAME
public static final java.lang.String SESSION_USERNAME
The username (String) of theUser
the session belongs to.- See Also:
- Constant Field Values
-
SESSION_USER
public static final java.lang.String SESSION_USER
TheUser
the session belongs to.- See Also:
- Constant Field Values
-
SESSION_PROJECT_NAME
public static final java.lang.String SESSION_PROJECT_NAME
The name (a String) of the project that this session has loaded- See Also:
- Constant Field Values
-
SESSION_REMOTE_ADDR
public static final java.lang.String SESSION_REMOTE_ADDR
This is the address of the client, a String, as returned byServletRequest.getRemoteAddr()
- See Also:
- Constant Field Values
-
SESSION_MEM_USED
public static final java.lang.String SESSION_MEM_USED
- See Also:
- Constant Field Values
-
SESSION_REMOTE_HOST
public static final java.lang.String SESSION_REMOTE_HOST
This holds the self-reported "hostname" (a String) that the client sent when it first logged in. This is whatever:InetAddress.getLocalHost().getHostName()
returns from the client JVM.
- See Also:
- Constant Field Values
-
SESSION_TIMEZONE
public static final java.lang.String SESSION_TIMEZONE
Holds theTimeZone
that the client JVM is in- See Also:
- Constant Field Values
-
SESSION_CLIENT_JVM_VERSION
public static final java.lang.String SESSION_CLIENT_JVM_VERSION
Holds the Java Version of the client JVM- See Also:
- Constant Field Values
-
-
Method Detail
-
exists
public static boolean exists()
Checks if theSession
threadlocal is set in this thread- Returns:
- true if
Session.get()
can return the instance of session, false otherwise
-
get
public static ClientReqSession get()
Get the session for the calling thread.- Returns:
- GWSession for calling thread
-
set
protected static void set(ClientReqSession session)
Sets session for calling thread.- Parameters:
session
- The session
-
unset
protected static void unset()
Clears the session for calling thread.
-
getLocale
public abstract java.util.Locale getLocale()
-
addNotification
public abstract void addNotification(java.lang.String moduleId, java.lang.String messageType, java.io.Serializable message)
Adds a notification message that will be sent down to this session's client and delivered as a PushNotification.
-
isDesigner
public boolean isDesigner()
-
getScope
public abstract int getScope()
Returns this client's ApplicationScope, either Client or Designer- See Also:
ApplicationScope
-
getPublicId
public abstract java.lang.String getPublicId()
Returns a unique but irreversible hash of the true id
-
setMessageFilter
public abstract void setMessageFilter(java.lang.String name, MessageFilter filter)
Sets a named filter on this session. Setting to null is the same as removing the filter.
-
isValid
public abstract boolean isValid()
-
-