Interface Session
- 
- All Superinterfaces:
- AuditingContext,- LoggingContext,- PerspectiveElement,- PropertyTreeOwner
 - All Known Subinterfaces:
- InternalSession
 - All Known Implementing Classes:
- AbstractSession,- PerspectiveDesignSession,- PerspectiveProjectSession,- SecuredPerspectiveProjectSession,- SessionKernelWrapper
 
 public interface Session extends PerspectiveElement 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceSession.WebAuthStatusChangeEvent
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidclose(java.lang.String message)Destroys this session and moves clients to a terminal state of closedViewModelcreateViewModel(PageModel group, ViewInstanceId id, ViewConfig config, com.inductiveautomation.ignition.common.gson.JsonObject params)java.util.Optional<? extends Page>findPage(java.lang.String pageId)Find thePageassociated with the given page IDjava.util.concurrent.CompletableFuture<java.util.Optional<ViewConfig>>findViewConfig(java.lang.String viewPath)Returns aCompletableFuturethat completes to present anOptional<ViewConfig> for the specified path.com.google.common.eventbus.EventBusgetEventBus()Deprecated.Replaced bygetEventManager().EventManagergetEventManager()AnEventManagerfor events targeted to the running Perspective Project this session.default GatewayContextgetGatewayContext()default LoggingContextgetMdcParent()default java.lang.StringgetName()NamedQueryManagergetNamedQueryManager()default PagegetPage()java.util.List<? extends Page>getPages()default longgetPageTimeout()PerspectiveContextgetPerspectiveContext()java.lang.StringgetProjectName()The project that this session is running.ScriptManagergetScriptManager()default SessiongetSession()java.util.UUIDgetSessionId()SessionStatsgetSessionStats()TagHistoryManagergetTagHistoryManager()TagManagergetTagManager()default ViewgetView()WebAuthStatusgetWebAuthStatus()default voidmdcSetup()Set up the MDC keys for this contextdefault voidmdcTeardown()Tear down the MDC keys that are added in #mdcSetupExecutionQueuequeue()Queue upon which all work for components and their properties should occur onvoidrefreshBinding(PropertyKey property)Refresh the binding for the given propertySessionScopescope()The scope in which this context represents -- Client or Designerdefault voidsendErrorToDesigner(java.lang.String message, java.lang.Throwable throwable)Pipes the error message down to the designer (or no-op if this is a client)- 
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.AuditingContextaudit, getAuditSnapshot
 - 
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.LoggingContextgetLogger, mdc, mdcSetupTree, mdcTeardownTree, mdcWrap
 - 
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.PerspectiveElementcreatePropertyReference, getAuditProfile, getQualifiedPath, isRunning
 - 
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.PropertyTreeOwnergetPropertyTreeOf
 
- 
 
- 
- 
- 
Method Detail- 
queueExecutionQueue queue() Queue upon which all work for components and their properties should occur on
 - 
scopeSessionScope scope() The scope in which this context represents -- Client or Designer
 - 
getProjectNamejava.lang.String getProjectName() The project that this session is running.
 - 
findPagejava.util.Optional<? extends Page> findPage(java.lang.String pageId) Find thePageassociated with the given page ID- Parameters:
- pageId- the page ID associated with the target page
- Returns:
- the page associated with the given page ID if it exists
 
 - 
getPagesjava.util.List<? extends Page> getPages() - Returns:
- A list of all open pages for this session
 
 - 
findViewConfigjava.util.concurrent.CompletableFuture<java.util.Optional<ViewConfig>> findViewConfig(java.lang.String viewPath) Returns aCompletableFuturethat completes to present anOptional<ViewConfig> for the specified path. The use of the future is to allow for the asynch collection of configs for views which are retrieved via asynchronous processes, as is the case when a view is being edited/altered in the designer.- Parameters:
- viewPath- path to the view's project resource within the project being run.
 
 - 
createViewModelViewModel createViewModel(PageModel group, ViewInstanceId id, ViewConfig config, com.inductiveautomation.ignition.common.gson.JsonObject params) 
 - 
getTagManagerTagManager getTagManager() 
 - 
getTagHistoryManagerTagHistoryManager getTagHistoryManager() 
 - 
getScriptManagerScriptManager getScriptManager() 
 - 
getNamedQueryManagerNamedQueryManager getNamedQueryManager() 
 - 
getEventBus@Deprecated com.google.common.eventbus.EventBus getEventBus() Deprecated.Replaced bygetEventManager(). Will be removed in 8.2.0
 - 
getEventManagerEventManager getEventManager() AnEventManagerfor events targeted to the running Perspective Project this session.
 - 
getSessionStatsSessionStats getSessionStats() - Returns:
- An object containing various statistics that pertain to this session. Also useful for registering metrics that will automatically get removed when this session is shut down.
 
 - 
getSessionIdjava.util.UUID getSessionId() - Returns:
- A unique identifier for this session instance.
 
 - 
getPerspectiveContextPerspectiveContext getPerspectiveContext() 
 - 
getGatewayContextdefault GatewayContext getGatewayContext() 
 - 
getPageTimeoutdefault long getPageTimeout() 
 - 
getWebAuthStatus@Nonnull WebAuthStatus getWebAuthStatus() - Returns:
- the WebAuthStatusfor thisSession
 
 - 
refreshBindingvoid refreshBinding(PropertyKey property) Refresh the binding for the given property- Parameters:
- property- the property which has the binding to refresh
 
 - 
getNamedefault java.lang.String getName() - Specified by:
- getNamein interface- PerspectiveElement
- Returns:
- The name of the element. If this is a component, it will be the name of the component. If this is a View, the name will be "view". If this is a Page, the name will be "page". If this is the session, the name will be "session".
 
 - 
getSession@Nonnull default Session getSession() - Specified by:
- getSessionin interface- PerspectiveElement
- Returns:
- The session that this element is a part of.
 
 - 
getPage@Nullable default Page getPage() - Specified by:
- getPagein interface- PerspectiveElement
- Returns:
- The Page that this element is part of. Will return null if this is the Session
 
 - 
getView@Nullable default View getView() - Specified by:
- getViewin interface- PerspectiveElement
- Returns:
- The view within which this element exists, or null if this is a Page or Session
 
 - 
getMdcParent@Nullable default LoggingContext getMdcParent() - Specified by:
- getMdcParentin interface- LoggingContext
 
 - 
mdcSetupdefault void mdcSetup() Description copied from interface:LoggingContextSet up the MDC keys for this context- Specified by:
- mdcSetupin interface- LoggingContext
 
 - 
mdcTeardowndefault void mdcTeardown() Description copied from interface:LoggingContextTear down the MDC keys that are added in #mdcSetup- Specified by:
- mdcTeardownin interface- LoggingContext
 
 - 
closevoid close(@Nullable java.lang.String message)Destroys this session and moves clients to a terminal state of closed- Parameters:
- message- the message displayed to the client on the terminal state page
 
 - 
sendErrorToDesignerdefault void sendErrorToDesigner(java.lang.String message, java.lang.Throwable throwable)Pipes the error message down to the designer (or no-op if this is a client)
 
- 
 
-