ICEfaces Core 3.3.0
Java API Documentation

org.icefaces.application
Class PushRenderer

java.lang.Object
  extended by org.icefaces.application.PushRenderer

public class PushRenderer
extends java.lang.Object

The PushRenderer allows an application to initiate rendering asynchronously and independently of user interaction for a group of sessions or views. When a session is rendered, all windows or views that a particular user has open in their session will be updated via Ajax Push with the current application state.


Field Summary
static java.lang.String ALL_SESSIONS
           
 
Constructor Summary
PushRenderer()
           
 
Method Summary
static void addCurrentSession(java.lang.String groupName)
          All subsequently created views in the current session will be added to the specified group.
static void addCurrentView(java.lang.String groupName)
          Add the current view to the specified group.
static java.util.Set<java.lang.String> getCurrentSessionPushIDSet()
          Gets the Set of Push IDs associated with the current session.
static java.lang.String getCurrentViewPushID()
          Gets the Push ID associated with the current view.
static PortableRenderer getPortableRenderer()
          Create a PortableRenderer instance.
static PortableRenderer getPortableRenderer(javax.servlet.ServletContext servletContext)
           
static org.icepush.PushContext getPushContext()
          Get the push context.
static void removeCurrentSession(java.lang.String groupName)
          Remove the current views from the specified group.
static void removeCurrentView(java.lang.String groupName)
          Remove the current view from the specified group.
static void render(java.lang.String groupName)
          Render the specified group of sessions by performing the JavaServer Faces execute and render lifecycle phases.
static void render(java.lang.String group, org.icefaces.application.PushOptions options)
          Render message to the specified group of sessions but only to the clients that have their blocking connection paused.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_SESSIONS

public static final java.lang.String ALL_SESSIONS
See Also:
Constant Field Values
Constructor Detail

PushRenderer

public PushRenderer()
Method Detail

addCurrentView

public static void addCurrentView(java.lang.String groupName)
Add the current view to the specified group. Groups are automatically garbage collected when all members become unable to receive push updates.

Parameters:
groupName - the name of the group to add the current view to

getCurrentViewPushID

public static java.lang.String getCurrentViewPushID()
Gets the Push ID associated with the current view.

Returns:
The Push ID or null if ICEpush is not present.
Throws:
java.lang.RuntimeException - if the current thread is not a JSF thread.

removeCurrentView

public static void removeCurrentView(java.lang.String groupName)
Remove the current view from the specified group.

Parameters:
groupName - the name of the group to remove the current view from

addCurrentSession

public static void addCurrentSession(java.lang.String groupName)
All subsequently created views in the current session will be added to the specified group. Groups of sessions are automatically garbage collected when all member sessions have become invalid.

Parameters:
groupName - the name of the group to add the current session to

getCurrentSessionPushIDSet

public static java.util.Set<java.lang.String> getCurrentSessionPushIDSet()
Gets the Set of Push IDs associated with the current session.

Returns:
The Set of Push IDs or null if ICEpush is not present.
Throws:
java.lang.RuntimeException - if the current thread is not a JSF thread.

removeCurrentSession

public static void removeCurrentSession(java.lang.String groupName)
Remove the current views from the specified group. Use of this method is optional as group membership is maintained automatically as clients leave.

Parameters:
groupName - the name of the group to remove the current view from

getPushContext

public static org.icepush.PushContext getPushContext()
Get the push context.

Returns:
The Push context or null if ICEpush is not present.
Throws:
java.lang.RuntimeException - if the current thread is not a JSF thread.

render

public static void render(java.lang.String groupName)
Render the specified group of sessions by performing the JavaServer Faces execute and render lifecycle phases.

Parameters:
groupName - the name of the group of sessions to render.

render

public static void render(java.lang.String group,
                          org.icefaces.application.PushOptions options)
Render message to the specified group of sessions but only to the clients that have their blocking connection paused.

Parameters:
group - the name of the group of sessions to render.
options - options for this push request

getPortableRenderer

public static PortableRenderer getPortableRenderer()
Create a PortableRenderer instance. PortableRenderer can trigger renderings in the context of the application. Once acquired it does not need a current FacesContext in order to function. The returned instances are not serializable.

Returns:
application wide PortableRenderer instance

getPortableRenderer

public static PortableRenderer getPortableRenderer(javax.servlet.ServletContext servletContext)

ICEfaces Core 3.3.0
Java API Documentation

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