ICEpush 3.3.0
Java API Documentation

org.icepush
Class PushContext

java.lang.Object
  extended by org.icepush.PushContext

public class PushContext
extends java.lang.Object


Constructor Summary
PushContext(javax.servlet.ServletContext context)
           Constructs a new PushContext using the specified context.
 
Method Summary
 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 context)
           Gets the PushContext instance associated with the specified context.
 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(PushGroupManager pushGroupManager)
           Sets the push group manager.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushContext

public PushContext(javax.servlet.ServletContext context)

Constructs a new PushContext using the specified context.

Parameters:
context - The ServletContext.
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(PushGroupManager pushGroupManager)

Sets the push group manager.

Note: This method is not intended for application use!

Parameters:
pushGroupManager -

getInstance

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

Gets the PushContext instance associated with the specified context.

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

ICEpush 3.3.0
Java API Documentation

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