org.icepush

## Class PushContext

- java.lang.Object
- - org.icepush.PushContext

-     public class PushContext
      extends java.lang.Object

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addGroupMember(java.lang.String groupName, java.lang.String pushId)` Adds the specified `pushId` to the group with the specified `groupName`.
    `void` | `backOff(java.lang.String browserID, long delay)` Instructs the specified browser to back off from ajax push listen for the specified number of milliseconds.
    `java.lang.String` | `createPushId(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Creates a Push ID consisting of the Browser ID and Sub ID.
    `java.lang.String` | `generateBrowserID()`
    `static PushContext` | `getInstance(javax.servlet.ServletContext servletContext)` Gets the PushContext instance associated with the specified `servletContext`.
    `void` | `push(java.lang.String groupName)` Initiate a Server Push to the members of the group specified by the `groupName`.
    `void` | `push(java.lang.String groupName, PushConfiguration config)` Initiate a Server Push to the members of the group specified by the `groupName`.
    `void` | `removeGroupMember(java.lang.String groupName, java.lang.String pushId)` Removes the specified `pushId` from the group with the specified `groupName`.
    `void` | `setPushGroupManager(org.icepush.PushGroupManager pushGroupManager)` Sets the push group manager.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### backOff

          public void backOff(java.lang.String browserID,
                              long delay)

      Instructs the specified browser to back off from ajax push listen for the specified number of milliseconds.

      Parameters:
        `browserID` - The ICEpush browser ID as stored in the ice.push.browser cookie.
        `delay` - The delay in milliseconds the browser needs to back off.

    - #### createPushId

          public java.lang.String createPushId(javax.servlet.http.HttpServletRequest request,
                                               javax.servlet.http.HttpServletResponse response)

      Creates a Push ID consisting of the Browser ID and Sub ID. If the specified `request` does not contain a Browser ID already, it will be created and set on the specified `request` and `response`.

      Parameters:
        `request` - The HTTP Servlet request.
        `response` - The HTTP Servlet response.
      Returns:
        The created Push ID.

    - #### push

          public void push(java.lang.String groupName)

      Initiate a Server Push to the members of the group specified by the `groupName`.

      Parameters:
        `groupName` - The group name of the group.
      See Also:
        `push(String, PushConfiguration)`

    - #### push

          public void push(java.lang.String groupName,
                           PushConfiguration config)

      Initiate a Server Push to the members of the group specified by the `groupName`.

      Parameters:
        `groupName` - The group name of the group.
        `config` - The Push configuration.
      See Also:
        `push(String)`

    - #### addGroupMember

          public void addGroupMember(java.lang.String groupName,
                                     java.lang.String pushId)

      Adds the specified `pushId` to the group with the specified `groupName`.

      Parameters:
        `groupName` - The name of the group the specified `pushId` needs to be added to.
        `pushId` - The Push ID that needs to be added.

    - #### removeGroupMember

          public void removeGroupMember(java.lang.String groupName,
                                        java.lang.String pushId)

      Removes the specified `pushId` from the group with the specified `groupName`.

      Parameters:
        `groupName` - The name of the group the specified `pushId` needs to be removed from.
        `pushId` - The Push ID that needs to be removed.

    - #### setPushGroupManager

          public void setPushGroupManager(org.icepush.PushGroupManager pushGroupManager)

      Sets the push group manager.

      Note: This method is not intended for application use!

      Parameters:
        `pushGroupManager` - the push group manager

    - #### getInstance

          public static PushContext getInstance(javax.servlet.ServletContext servletContext)

      Gets the PushContext instance associated with the specified `servletContext`.

      Parameters:
        `servletContext` - The ServletContext from which to get the PushContext.
      Returns:
        The PushContext.

    - #### generateBrowserID

          public java.lang.String generateBrowserID()

Copyright 2025 ICEsoft Technologies Canada, Corp. All Rights Reserved.