Class ClientReqSession
java.lang.Object
com.inductiveautomation.ignition.gateway.clientcomm.ClientReqSession
- All Implemented Interfaces:
javax.servlet.http.HttpSession
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Holds the Java Version of the client JVMstatic final String
true
if the session belongs to a designer.static final String
static final String
Holds the mutability mode of the session.static final String
The name (a String) of the project that this session has loadedstatic final String
This is the address of the client, a String, as returned byServletRequest.getRemoteAddr()
static final String
This holds the self-reported "hostname" (a String) that the client sent when it first logged in.static final String
Holds theTimeZone
that the client JVM is instatic final String
TheClientReqSession.User
the session belongs to.static final String
The username (String) of theClientReqSession.User
the session belongs to. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
addNotification
(String moduleId, String messageType, 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 Locale
abstract MutabilityMode
abstract String
Returns a unique but irreversible hash of the true idabstract int
getScope()
Returns this client's ApplicationScope, either Client or Designerboolean
abstract boolean
isValid()
protected static void
set
(ClientReqSession session) Sets session for calling thread.abstract void
setMessageFilter
(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 Details
-
SESSION_IS_DESIGNER
true
if the session belongs to a designer.- See Also:
-
SESSION_USERNAME
The username (String) of theClientReqSession.User
the session belongs to.- See Also:
-
SESSION_USER
TheClientReqSession.User
the session belongs to.- See Also:
-
SESSION_PROJECT_NAME
The name (a String) of the project that this session has loaded- See Also:
-
SESSION_REMOTE_ADDR
This is the address of the client, a String, as returned byServletRequest.getRemoteAddr()
- See Also:
-
SESSION_MEM_USED
- See Also:
-
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:
-
SESSION_TIMEZONE
Holds theTimeZone
that the client JVM is in- See Also:
-
SESSION_CLIENT_JVM_VERSION
Holds the Java Version of the client JVM- See Also:
-
SESSION_MUTABILITY
Holds the mutability mode of the session.- See Also:
-
-
Constructor Details
-
ClientReqSession
public ClientReqSession()
-
-
Method Details
-
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
Get the session for the calling thread.- Returns:
- GWSession for calling thread
-
set
Sets session for calling thread.- Parameters:
session
- The session
-
unset
protected static void unset()Clears the session for calling thread. -
getLocale
-
addNotification
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:
-
getPublicId
Returns a unique but irreversible hash of the true id -
setMessageFilter
Sets a named filter on this session. Setting to null is the same as removing the filter. -
isValid
public abstract boolean isValid() -
getMutabilityMode
-