public class PushContext
extends java.lang.Object
| 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.
|
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 pushConfiguration)
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. |
public void addGroupMember(java.lang.String groupName,
java.lang.String pushID)
throws java.lang.IllegalArgumentException
Adds the specified pushID to the group with the specified groupName.
groupName - The name of the group the specified pushID needs to be added to.pushID - The Push ID that needs to be added.java.lang.IllegalArgumentException - If the specified groupName and/or the specified pushID is
null or empty.public void backOff(java.lang.String browserID,
long delay)
throws java.lang.IllegalArgumentException
Instructs the specified browser to back off from ajax push listen for the specified number of milliseconds.
browserID - The ICEpush browser ID as stored in the ice.push.browser cookie.delay - The delay in milliseconds the browser needs to back off.java.lang.IllegalArgumentException - If the specified browserID is null or empty and/or the specified
delay is less than 0.public java.lang.String createPushId(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.IllegalArgumentException
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.
request - The HTTP Servlet request.response - The HTTP Servlet response.java.lang.IllegalArgumentException - If the specified request and/or response is null.public void push(java.lang.String groupName)
throws java.lang.IllegalArgumentException
Initiate a Server Push to the members of the group specified by the groupName.
groupName - The group name of the group.java.lang.IllegalArgumentException - If the specified groupName is null or empty.push(String, PushConfiguration)public void push(java.lang.String groupName,
PushConfiguration pushConfiguration)
throws java.lang.IllegalArgumentException
Initiate a Server Push to the members of the group specified by the groupName.
groupName - The group name of the group.pushConfiguration - The Push configuration.java.lang.IllegalArgumentException - If the specified groupName is null or empty.push(String)public void removeGroupMember(java.lang.String groupName,
java.lang.String pushID)
throws java.lang.IllegalArgumentException
Removes the specified pushId from the group with the specified groupName.
groupName - The name of the group the specified pushId needs to be removed from.pushID - The Push ID that needs to be removed.java.lang.IllegalArgumentException - If the specified groupName and/or the specified pushID is
null or empty.public static PushContext getInstance(javax.servlet.ServletContext servletContext) throws java.lang.IllegalArgumentException
Gets the PushContext instance associated with the specified servletContext.
servletContext - The ServletContext from which to get the PushContext.java.lang.IllegalArgumentException - If the specified servletContext is null.Copyright 2025 ICEsoft Technologies Canada Corp., All Rights Reserved.