Class SecuredPerspectiveProjectSession
java.lang.Object
com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
com.inductiveautomation.perspective.gateway.session.SessionKernelWrapper<com.inductiveautomation.perspective.gateway.session.SecuredPerspectiveProjectSession.SessionKernelImpl>
com.inductiveautomation.perspective.gateway.session.SecuredPerspectiveProjectSession
- All Implemented Interfaces:
- com.inductiveautomation.ignition.gateway.clientcomm.scriptmsg.event.SessionMessageDispatchHandler,- AuditingContext,- LoggingContext,- PerspectiveElement,- PropertyTreeOwner,- Session,- InternalSession,- SessionKernel
public class SecuredPerspectiveProjectSession
extends SessionKernelWrapper<com.inductiveautomation.perspective.gateway.session.SecuredPerspectiveProjectSession.SessionKernelImpl>
implements com.inductiveautomation.ignition.gateway.clientcomm.scriptmsg.event.SessionMessageDispatchHandler
A client session secured by the security levels set in the project's permissions.
 This class is a proxy to a 
PerspectiveProjectSession which is only created and run when the user is
 authorized to do so.- 
Nested Class SummaryNested classes/interfaces inherited from interface com.inductiveautomation.perspective.gateway.session.InternalSessionInternalSession.PageVisitorNested classes/interfaces inherited from interface com.inductiveautomation.perspective.gateway.api.SessionSession.WebAuthStatusChangeEvent
- 
Field SummaryFields inherited from interface com.inductiveautomation.perspective.gateway.session.InternalSessionSESSION
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidBroadcast a message to all pages associated with this sessionvoidShuts down and removes the page associated with the given page ID which will disconnect the associated message channel (if one is connected).voidShuts down and removes the page associated with the given page ID which will disconnect the associated message channel (if one is connected).createPropertyReference(String referencePath, Consumer<PropertyTreeChangeEvent> subscriber, Set<Origin> acceptableOrigins) Create aPropertyReferencewith thisPerspectiveElementas the target.createViewModel(PageModel group, ViewInstanceId id, ViewConfig config, com.inductiveautomation.ignition.common.gson.JsonObject params) Find thePageassociated with the given page IDfindViewConfig(String viewPath) Returns aCompletableFuturethat completes to present anOptional<ViewConfig> for the specified path.intintThe current locale for this session, or a safe defaultLocale.getDefault()if not available.getOrCreatePage(String pageId) Fetch thePageModelassociated with the given page ID.intgetPages()Fetch the project associated with this session.getPropertyTreeOf(PropertyType propertyType) Fetch thePropertyTreeassociated with the givenPropertyTypeThe current timezone id for this session, or a safe default if not available.inthandleMessage(com.inductiveautomation.ignition.gateway.clientcomm.scriptmsg.event.SessionMessageDispatchEvent event) Logout of this session.voidnotifyConnected(MessageChannel channel) Let the session know that the page has connectedvoidnotifyDisconnected(MessageChannel channel) Let the session know that the page has disconnectedvoidonKeepaliveReceived(String pageId, long timestamp) Called by the client to keep the session alive.voidonLoginResponse(WebAuthResponseContext webAuthResponseContext) Called when the session receives a login response from the IdPvoidonLogoutResponse(WebAuthResponseContext webAuthResponseContext) Called when this session received a logout response from the IdPvoidonSessionInit(com.inductiveautomation.ignition.common.gson.JsonObject sessionInitResponse) Called during the session-init lifecycle of the client.voidreceive(MessageChannel channel, String protocol, Reader payload) Called when this session has received a message from the message channel.voidrefreshBinding(PropertyKey property) Refresh the binding for the given propertyvoidupdateSessionProps(SessionPropsConfig config) Update the props and bindings associated with this sessionvoidvisitPage(String pageId, InternalSession.PageVisitor visitor) Visit the page associated with the given ID.Methods inherited from class com.inductiveautomation.perspective.gateway.session.SessionKernelWrapperclaimToken, createToken, getAuditSnapshot, getEventBus, getEventManager, getGson, getLastComm, getLastMessageTime, getLogger, getLogoutMessage, getPageClosedMessage, getProjectName, getSessionClosedMessage, getSessionCollection, getSessionId, getSessionInfo, getSessionStats, getStartupTime, getUptime, onHello, onShutdown, onStartup, queue, touchMethods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycleisRunning, shutdown, startupMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.inductiveautomation.perspective.gateway.api.AuditingContextauditMethods inherited from interface com.inductiveautomation.perspective.gateway.session.InternalSessionclose, destroySession, getPerspectiveContext, getTimeZone, isRunning, scope, shutdown, startupMethods inherited from interface com.inductiveautomation.perspective.gateway.api.LoggingContextmdc, mdcSetupTree, mdcTeardownTree, mdcWrapMethods inherited from interface com.inductiveautomation.perspective.gateway.api.PerspectiveElementgetAuditProfile, getQualifiedPathMethods inherited from interface com.inductiveautomation.perspective.gateway.api.SessiongetGatewayContext, getMdcParent, getName, getPage, getPageTimeout, getSession, getView, mdcSetup, mdcTeardown, sendErrorToDesignerMethods inherited from interface com.inductiveautomation.perspective.gateway.session.SessionKernelshutdown, startup
- 
Method Details- 
handleMessagepublic List<String> handleMessage(com.inductiveautomation.ignition.gateway.clientcomm.scriptmsg.event.SessionMessageDispatchEvent event) - Specified by:
- handleMessagein interface- com.inductiveautomation.ignition.gateway.clientcomm.scriptmsg.event.SessionMessageDispatchHandler
 
- 
broadcastDescription copied from class:SessionKernelWrapperBroadcast a message to all pages associated with this session- Specified by:
- broadcastin class- SessionKernelWrapper<com.inductiveautomation.perspective.gateway.session.SecuredPerspectiveProjectSession.SessionKernelImpl>
- Parameters:
- protocol- the protocol of the message to broadcast
- payload- the payload of the message to broadcast
 
- 
getProjectDescription copied from interface:InternalSessionFetch the project associated with this session.- Specified by:
- getProjectin interface- InternalSession
- Returns:
- the PerspectiveProjectassociated with this session
 
- 
notifyConnectedDescription copied from interface:InternalSessionLet the session know that the page has connected- Specified by:
- notifyConnectedin interface- InternalSession
- Parameters:
- channel- the- MessageChannelused for communications between the client page and the gateway page
 
- 
notifyDisconnectedDescription copied from interface:InternalSessionLet the session know that the page has disconnected- Specified by:
- notifyDisconnectedin interface- InternalSession
- Parameters:
- channel- the- MessageChannelused for communications between the client page and the gateway page
 
- 
receiveDescription copied from interface:InternalSessionCalled when this session has received a message from the message channel.- Specified by:
- receivein interface- InternalSession
- Parameters:
- channel- the- MessageChannelfrom which the message was received
- protocol- the protocol of the message
- payload- the payload of the message
 
- 
getOrCreatePageDescription copied from interface:InternalSessionFetch thePageModelassociated with the given page ID. If the page does not exist, it is created, associated with the given page ID, and returned.- Specified by:
- getOrCreatePagein interface- InternalSession
- Parameters:
- pageId- the page ID associated with the target page
- Returns:
- the page associated with the given page ID or a new page if it does not exist
 
- 
findPageDescription copied from interface:SessionFind thePageassociated with the given page ID- Specified by:
- findPagein interface- InternalSession
- Specified by:
- findPagein interface- Session
- Parameters:
- pageId- the page ID associated with the target page
- Returns:
- the page associated with the given page ID if it exists
 
- 
getPages- Specified by:
- getPagesin interface- InternalSession
- Specified by:
- getPagesin interface- Session
- Returns:
- A list of all open pages for this session
 
- 
getPageCountpublic int getPageCount()- Specified by:
- getPageCountin interface- InternalSession
 
- 
getViewCountpublic int getViewCount()- Specified by:
- getViewCountin interface- InternalSession
 
- 
getComponentCountpublic int getComponentCount()- Specified by:
- getComponentCountin interface- InternalSession
 
- 
getBindingCountpublic int getBindingCount()- Specified by:
- getBindingCountin interface- InternalSession
 
- 
visitPageDescription copied from interface:InternalSessionVisit the page associated with the given ID. If the page is found,InternalSession.PageVisitor.onPageFound(PageModel)is invoked with the target page. If the page is not found,InternalSession.PageVisitor.onPageMissing()is invoked. If the page is closed,InternalSession.PageVisitor.onPageClosed(String)is invoked with the closed message.- Specified by:
- visitPagein interface- InternalSession
- Parameters:
- pageId- the target page ID
- visitor- the page visitor
 
- 
closePageDescription copied from interface:InternalSessionShuts down and removes the page associated with the given page ID which will disconnect the associated message channel (if one is connected).- Specified by:
- closePagein interface- InternalSession
- Parameters:
- pageId- the page ID associated with the target page
 
- 
closePageDescription copied from interface:InternalSessionShuts down and removes the page associated with the given page ID which will disconnect the associated message channel (if one is connected). Moves the client to a terminal state page of closed with the given message.- Specified by:
- closePagein interface- InternalSession
- Parameters:
- pageId- the page ID associated with the target page
- message- the message displayed to the client on the terminal state page
 
- 
onSessionInitpublic void onSessionInit(com.inductiveautomation.ignition.common.gson.JsonObject sessionInitResponse) Description copied from interface:InternalSessionCalled during the session-init lifecycle of the client. Implementations may modify the given response JSON object to pass back to the client.- Specified by:
- onSessionInitin interface- InternalSession
- Parameters:
- sessionInitResponse- the response JSON object to be passed back to the client in response to the session-init call
 
- 
logoutDescription copied from interface:InternalSessionLogout of this session. The user will no longer be authenticated.- Specified by:
- logoutin interface- InternalSession
- Parameters:
- message- the message to display to the user after they are logged out of this session
- Returns:
- a logout token or hint for the IdP if one is available
 
- 
onLoginResponseDescription copied from interface:InternalSessionCalled when the session receives a login response from the IdP- Specified by:
- onLoginResponsein interface- InternalSession
- Parameters:
- webAuthResponseContext- the login response object
 
- 
onLogoutResponseDescription copied from interface:InternalSessionCalled when this session received a logout response from the IdP- Specified by:
- onLogoutResponsein interface- InternalSession
- Parameters:
- webAuthResponseContext- the logout response object
 
- 
onKeepaliveReceivedDescription copied from interface:InternalSessionCalled by the client to keep the session alive.- Specified by:
- onKeepaliveReceivedin interface- InternalSession
- Parameters:
- pageId- the page ID of the page which triggered the keep alive request
- timestamp- the timestamp associated with the keep alive request
 
- 
updateSessionPropsDescription copied from interface:InternalSessionUpdate the props and bindings associated with this session- Specified by:
- updateSessionPropsin interface- InternalSession
- Parameters:
- config- the session props config to apply
 
- 
findViewConfigDescription copied from interface:SessionReturns 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.- Specified by:
- findViewConfigin interface- Session
- Parameters:
- viewPath- path to the view's project resource within the project being run.
 
- 
createViewModelpublic ViewModel createViewModel(PageModel group, ViewInstanceId id, ViewConfig config, com.inductiveautomation.ignition.common.gson.JsonObject params) - Specified by:
- createViewModelin interface- Session
 
- 
getTagManager- Specified by:
- getTagManagerin interface- Session
 
- 
getTagHistoryManager- Specified by:
- getTagHistoryManagerin interface- Session
 
- 
getScriptManager- Specified by:
- getScriptManagerin interface- Session
 
- 
getNamedQueryManager- Specified by:
- getNamedQueryManagerin interface- Session
 
- 
getWebAuthStatus- Specified by:
- getWebAuthStatusin interface- Session
- Returns:
- the WebAuthStatusfor thisSession
 
- 
getLocaleDescription copied from interface:InternalSessionThe current locale for this session, or a safe defaultLocale.getDefault()if not available.- Specified by:
- getLocalein interface- InternalSession
 
- 
getTimeZoneIdDescription copied from interface:InternalSessionThe current timezone id for this session, or a safe default if not available.- Specified by:
- getTimeZoneIdin interface- InternalSession
 
- 
refreshBindingDescription copied from interface:SessionRefresh the binding for the given property- Specified by:
- refreshBindingin interface- Session
- Parameters:
- property- the property which has the binding to refresh
 
- 
createPropertyReference@Nonnull public PropertyReference createPropertyReference(String referencePath, Consumer<PropertyTreeChangeEvent> subscriber, Set<Origin> acceptableOrigins) Description copied from interface:PerspectiveElementCreate aPropertyReferencewith thisPerspectiveElementas the target.- Specified by:
- createPropertyReferencein interface- PerspectiveElement
- Parameters:
- referencePath- the path to the property
- subscriber- the subscriber - a- Consumerof- PropertyTreeChangeEvents
- acceptableOrigins- the- Setof- Origins in which the subscriber is interested
- Returns:
- the PropertyReference
 
- 
getPropertyTreeOfDescription copied from interface:PropertyTreeOwnerFetch thePropertyTreeassociated with the givenPropertyType- Specified by:
- getPropertyTreeOfin interface- PropertyTreeOwner
- Parameters:
- propertyType- The- PropertyTypeof the- PropertyTreewe want to fetch
- Returns:
- The PropertyTree or null if this PropertyTreeOwner does not manage a PropertyTree for the given PropertyType or if a null PropertyType is given
 
 
-