Interface SessionKernel
- All Known Implementing Classes:
- AbstractSession,- AbstractSessionKernel,- PerspectiveDesignSession,- PerspectiveProjectSession,- SecuredPerspectiveProjectSession,- SessionKernelWrapper
public interface SessionKernel
The nucleus of a Perspective Session. Instances are meant to be fixed and reused per-session. Useful for sharing
 between session proxies.
- 
Method SummaryModifier and TypeMethodDescriptionOptional<com.inductiveautomation.ignition.common.gson.JsonElement>claimToken(String type, String token) Claim the given token associated with the given data type previously created by this session kernel.createToken(String type, com.inductiveautomation.ignition.common.gson.JsonElement data) Create a new token associated with the given type and data for the this session kernel.com.google.common.eventbus.EventBusDeprecated.Replaced by getEventManager.default com.inductiveautomation.ignition.common.gson.GsongetGson()longlongqueue()voidshutdown()Shuts down the session kernelvoidstartup()Starts up the session kernelvoidtouch()Updates the last message time to the current time in nanoseconds
- 
Method Details- 
getSessionCollectionPerspectiveSessionCollection getSessionCollection()- Returns:
- the PerspectiveSessionCollectionwhich contains the session
 
- 
getProjectNameString getProjectName()- Returns:
- the name of the project associated with the session
 
- 
getGsondefault com.inductiveautomation.ignition.common.gson.Gson getGson()- Returns:
- a Gsoninstance for json serialization / de-serialization
 
- 
queueExecutionQueue queue()- Returns:
- the ExecutionQueueused to run session tasks in serial
 
- 
getLoggerLoggerEx getLogger()- Returns:
- the LoggerExassociated with the session
 
- 
getEventBusDeprecated.Replaced by getEventManager. To be removed in 8.2.0
- 
getEventManagerEventManager getEventManager()- Returns:
- the EventManagerassociated with the session
 
- 
getSessionIdUUID getSessionId()- Returns:
- the session's unique identifier
 
- 
startupvoid startup()Starts up the session kernel- Throws:
- IllegalStateException- if the session kernel has already been started or shutdown
 
- 
shutdownvoid shutdown()Shuts down the session kernel- Throws:
- IllegalStateException- if the session has not been started or if it has already been shut down
 
- 
getStartupTimelong getStartupTime()- Returns:
- the time in nanoseconds when the session kernel started (or 0 if the session kernel has not yet been started)
 
- 
getLastMessageTimelong getLastMessageTime()- Returns:
- the time in nanoseconds when the last message was received by the session containing this kernel
 
- 
getSessionStatsSessionStats getSessionStats()
- 
touchvoid touch()Updates the last message time to the current time in nanoseconds- See Also:
 
- 
createTokenCreate a new token associated with the given type and data for the this session kernel. The token expires in 30 seconds.- Returns:
- the new short-lived token
 
- 
claimTokenOptional<com.inductiveautomation.ignition.common.gson.JsonElement> claimToken(String type, String token) Claim the given token associated with the given data type previously created by this session kernel.- Parameters:
- token- the token to claim
- Returns:
- an Optionalcontaining theJsonElementdata associated with the given data type and token, or an empty Optional if no data exists for the given data type and token pair
 
 
-