The PushRenderer class is intended to contain only what is most critically needed – additional methods (such as remove()) cause application developers to believe that they need to be called for correct use.
We may want to remove addCurrentView() from this class.
These methods can be used in a JSF context only (or, perhaps we should allow render() to be called in a non-JSF context, but only for single .war deployments where a static singleton is appropriate).
Clustering is supported through a naming scheme on groupName.
public class org.icefaces.application.PushRenderer
{
public static final String ALL_SESSIONS;
public static void addCurrentSession(String groupName) throws IllegalStateException;
public static void addCurrentView(String groupName) throws IllegalStateException;
public static void render(String);
}
For more advanced use, including multi .war .ear deployments, non-JSF invocation in all contexts, an instance-based API is needed:
public class org.icefaces.application.PushRenderManager
{
public final String ALL_SESSIONS;
public static PushRenderManager getInstance() throws IllegalStateException;
public void addCurrentSession(String groupName) throws IllegalStateException;
public void addCurrentView(String groupName) throws IllegalStateException;
public void removeCurrentSession(String groupName);
public void removeCurrentView(String groupName);
public void render(String groupName);
public void stopRender(String groupName);
public void renderPeriodically(String groupName, long intervalMillis);
}
Rendering a single view can be performed via render(viewKey).
Clustered rendering (when supported) is directed through a groupName valid in a cluster-wide naming service, such as JNDI.
The PushRenderer class is intended to contain only what is most critically needed – additional methods (such as remove()) cause application developers to believe that they need to be called for correct use.
We may want to remove addCurrentView() from this class.
These methods can be used in a JSF context only (or, perhaps we should allow render() to be called in a non-JSF context, but only for single .war deployments where a static singleton is appropriate).
Clustering is supported through a naming scheme on groupName.
public class org.icefaces.application.PushRenderer
{ public static final String ALL_SESSIONS; public static void addCurrentSession(String groupName) throws IllegalStateException; public static void addCurrentView(String groupName) throws IllegalStateException; public static void render(String); }For more advanced use, including multi .war .ear deployments, non-JSF invocation in all contexts, an instance-based API is needed:
public class org.icefaces.application.PushRenderManager
{ public final String ALL_SESSIONS; public static PushRenderManager getInstance() throws IllegalStateException; public void addCurrentSession(String groupName) throws IllegalStateException; public void addCurrentView(String groupName) throws IllegalStateException; public void removeCurrentSession(String groupName); public void removeCurrentView(String groupName); public void render(String groupName); public void stopRender(String groupName); public void renderPeriodically(String groupName, long intervalMillis); }Rendering a single view can be performed via render(viewKey).
Clustered rendering (when supported) is directed through a groupName valid in a cluster-wide naming service, such as JNDI.