Enum BrowserPageContext

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      INSTANCE  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.logging.Logger LOGGER  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String addBrowserPage​(java.lang.String httpSessionId, BrowserPage browserPage)  
      void destroyContext​(java.lang.String httpSessionId)
      This should be called when the http session is closed
      boolean exists​(BrowserPage browserPage)
      Checks the existence of browserPage in this context.
      BrowserPage getBrowserPage​(java.lang.String instanceId)
      gets the browserPage object for the given instance id.
      BrowserPage getBrowserPage​(java.lang.String httpSessionId, java.lang.String instanceId)  
      java.util.Map<java.lang.String,BrowserPage> getBrowserPages​(java.lang.String httpSessionId)
      Gets all browser pages associated with this session.
      void httpSessionClosed​(java.lang.String httpSessionId)
      should be called when the httpsession is closed.
      static BrowserPageContext valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static BrowserPageContext[] values​()
      Returns an array containing the constants of this enum type, in the order they are declared.
      void webSocketClosed​(java.lang.String wffInstanceId)
      Deprecated.  
      BrowserPage webSocketClosed​(java.lang.String wffInstanceId, java.lang.String sessionId)
      this method should be called when the websocket is closed.
      BrowserPage websocketMessaged​(java.lang.String wffInstanceId, byte[] message)
      Deprecated. 
      use webSocketMessaged which does the same job.
      BrowserPage webSocketMessaged​(java.lang.String wffInstanceId, byte[] message)
      this method should be called when the websocket is messagedS
      BrowserPage webSocketOpened​(java.lang.String wffInstanceId)
      this method should be called when the websocket is opened
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • LOGGER

        public static final java.util.logging.Logger LOGGER
    • Method Detail

      • values

        public static BrowserPageContext[] values​()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BrowserPageContext c : BrowserPageContext.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BrowserPageContext valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • addBrowserPage

        public java.lang.String addBrowserPage​(java.lang.String httpSessionId,
                                               BrowserPage browserPage)
        Parameters:
        httpSessionId -
        browserPage -
        Returns:
        the instance id (unique) of the browser page.
        Since:
        2.0.0
      • getBrowserPage

        public BrowserPage getBrowserPage​(java.lang.String httpSessionId,
                                          java.lang.String instanceId)
        Parameters:
        httpSessionId -
        instanceId -
        Returns:
        Since:
        2.0.0
      • getBrowserPage

        public BrowserPage getBrowserPage​(java.lang.String instanceId)
        gets the browserPage object for the given instance id. BrowserPage#getBrowserPge(httpSessionId, instanceId) method is better than this method in terms of performance.
        Parameters:
        instanceId -
        Returns:
        browser page object if it exists otherwise null.
        Since:
        2.0.0
      • getBrowserPages

        public java.util.Map<java.lang.String,BrowserPage> getBrowserPages​(java.lang.String httpSessionId)
        Gets all browser pages associated with this session.
        Parameters:
        httpSessionId -
        Returns:
        an unmodifiable map of BrowserPages associated with this session where key as instanceId and value as BrowserPage.
        Since:
        2.0.2
      • destroyContext

        public void destroyContext​(java.lang.String httpSessionId)
        This should be called when the http session is closed
        Parameters:
        httpSessionId - the session id of http session
        Since:
        2.0.0
      • webSocketOpened

        public BrowserPage webSocketOpened​(java.lang.String wffInstanceId)
        this method should be called when the websocket is opened
        Parameters:
        wffInstanceId - the wffInstanceId which can be retried from the request parameter in websocket connection
        Returns:
        the BrowserPage object associated with this instance id, if the instanceId is associated with a closed http session it will return null.
        Since:
        2.0.0
      • webSocketClosed

        @Deprecated
        public void webSocketClosed​(java.lang.String wffInstanceId)
        Deprecated. 
        this method should be called when the websocket is closed
        Parameters:
        wffInstanceId - the wffInstanceId which can be retried from the request parameter in websocket connection
        Since:
        2.0.0
      • webSocketClosed

        public BrowserPage webSocketClosed​(java.lang.String wffInstanceId,
                                           java.lang.String sessionId)
        this method should be called when the websocket is closed.
        Parameters:
        wffInstanceId - the wffInstanceId which can be retried from the request parameter in websocket connection
        sessionId - the websocket session id, i.e. the unique id of the websocket session which is given in BrowserPage#addWebSocketPushListener method.
        Returns:
        browserPage instance associated with this wffInstanceId
        Since:
        2.1.0
      • httpSessionClosed

        public void httpSessionClosed​(java.lang.String httpSessionId)
        should be called when the httpsession is closed. The closed http session id should be passed as an argument.
        Parameters:
        httpSessionId -
        Since:
        2.0.0
      • websocketMessaged

        @Deprecated
        public BrowserPage websocketMessaged​(java.lang.String wffInstanceId,
                                             byte[] message)
        Deprecated. use webSocketMessaged which does the same job.
        This method is will be removed in the next version. Use webSocketMessaged method instead of this method.
        Parameters:
        wffInstanceId - the wffInstanceId which can be retried from the request parameter in websocket connection.
        message - the message received from websocket
        Since:
        2.0.0
      • webSocketMessaged

        public BrowserPage webSocketMessaged​(java.lang.String wffInstanceId,
                                             byte[] message)
        this method should be called when the websocket is messagedS
        Parameters:
        wffInstanceId - the wffInstanceId which can be retried from the request parameter in websocket connection.
        message - the message received from websocket
        Since:
        2.1.0
      • exists

        public boolean exists​(BrowserPage browserPage)
                       throws NullValueException
        Checks the existence of browserPage in this context.
        Parameters:
        browserPage -
        Returns:
        true if the given browserPage exists in the BrowserPageContext.
        Throws:
        NullValueException - if the given browserPage instance is null
        Since:
        2.1.13