Class AbstractSessionKernel

    • Method Detail

      • getProjectName

        public java.lang.String getProjectName()
        Specified by:
        getProjectName in interface SessionKernel
        Returns:
        the name of the project associated with the session
      • getEventBus

        public com.google.common.eventbus.EventBus getEventBus()
        Specified by:
        getEventBus in interface SessionKernel
        Returns:
        the EventBus associated with the session
      • getSessionId

        public java.util.UUID getSessionId()
        Specified by:
        getSessionId in interface SessionKernel
        Returns:
        the session's unique identifier
      • getStartupTime

        public long getStartupTime()
        Specified by:
        getStartupTime in interface SessionKernel
        Returns:
        the time in nanoseconds when the session kernel started (or 0 if the session kernel has not yet been started)
      • getLastMessageTime

        public long getLastMessageTime()
        Specified by:
        getLastMessageTime in interface SessionKernel
        Returns:
        the time in nanoseconds when the last message was received by the session containing this kernel
      • touch

        public void touch()
        Description copied from interface: SessionKernel
        Updates the last message time to the current time in nanoseconds
        Specified by:
        touch in interface SessionKernel
        See Also:
        System.nanoTime()
      • createToken

        public java.lang.String createToken​(java.lang.String type,
                                            com.inductiveautomation.ignition.common.gson.JsonElement jsonElement)
        Description copied from interface: SessionKernel
        Create a new token associated with the given type and data for the this session kernel. The token expires in 30 seconds.
        Specified by:
        createToken in interface SessionKernel
        Returns:
        the new short-lived token
      • claimToken

        public java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonElement> claimToken​(java.lang.String type,
                                                                                                       java.lang.String token)
        Description copied from interface: SessionKernel
        Claim the given token associated with the given data type previously created by this session kernel.
        Specified by:
        claimToken in interface SessionKernel
        token - the token to claim
        Returns:
        an Optional containing the JsonElement data associated with the given data type and token, or an empty Optional if no data exists for the given data type and token pair