Class PerspectiveSessionMonitor
- java.lang.Object
- 
- com.inductiveautomation.perspective.gateway.session.PerspectiveSessionMonitor
 
- 
 public class PerspectiveSessionMonitor extends java.lang.ObjectSimple class which holds a set of auth sessions that are currently live. These sessions are added by the perspective auth session itself when it gets an http binding event. It calls remove when the unbinding event is fired.
- 
- 
Constructor SummaryConstructors Constructor Description PerspectiveSessionMonitor(PerspectiveContext context)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<InternalSession>findSession(java.util.UUID sessionId)intgetBindingCount()java.util.List<InternalSession>getClientSessionsForProject(java.lang.String projectName)intgetComponentCount()intgetPageCount()java.util.Optional<PerspectiveSessionInfo>getProjectSessionInfo(java.lang.String authId, java.lang.String projectName)Get read only info on a particular client/designer session.longgetSessionCount(java.util.function.Predicate<InternalSession> predicate)Count of running client sessions.java.util.List<PerspectiveSessionInfo>getSessionInfos()Returns a readonly list of all current PerspectiveAuth sessions.intgetViewCount()voidonSessionShutdown(SessionShutdownEvent event)voidonSessionStarted(SessionStartupEvent event)
 
- 
- 
- 
Constructor Detail- 
PerspectiveSessionMonitorpublic PerspectiveSessionMonitor(PerspectiveContext context) 
 
- 
 - 
Method Detail- 
onSessionStartedpublic void onSessionStarted(SessionStartupEvent event) 
 - 
onSessionShutdownpublic void onSessionShutdown(SessionShutdownEvent event) 
 - 
getSessionInfos@Nonnull public java.util.List<PerspectiveSessionInfo> getSessionInfos() Returns a readonly list of all current PerspectiveAuth sessions.
 - 
getSessionCountpublic long getSessionCount(java.util.function.Predicate<InternalSession> predicate) Count of running client sessions.- Parameters:
- predicate- Only running client sessions that match this predicate will be counted
 
 - 
getPageCountpublic int getPageCount() 
 - 
getViewCountpublic int getViewCount() 
 - 
getComponentCountpublic int getComponentCount() 
 - 
getBindingCountpublic int getBindingCount() 
 - 
getProjectSessionInfopublic java.util.Optional<PerspectiveSessionInfo> getProjectSessionInfo(java.lang.String authId, java.lang.String projectName) Get read only info on a particular client/designer session. A convenience method to return only a single session info if that session exists.- Parameters:
- authId- The parent session id.
- projectName- The requested project name.
- Returns:
- {PerspectiveSessionInfo} The session details or null if not found.
 
 - 
getClientSessionsForProjectpublic java.util.List<InternalSession> getClientSessionsForProject(java.lang.String projectName) 
 - 
findSessionpublic java.util.Optional<InternalSession> findSession(java.util.UUID sessionId) 
 
- 
 
-