public class CometdPushService
extends org.wicketstuff.push.AbstractPushService
IPushService.
This implementation relies on cometd for updating the page, but actually uses regular cometd events, that will trigger a Wicket AJAX call to get the page actually refreshed using regular Wicket AJAX mechanisms.
This mean that each time an event is published, a new connection is made to the server to get the
actual page update performed by the IPushEventHandler.
| Modifier and Type | Method and Description |
|---|---|
static CometdPushService |
get() |
static CometdPushService |
get(org.apache.wicket.protocol.http.WebApplication application) |
static org.wicketstuff.push.IPushServiceRef<CometdPushService> |
getRef() |
<EventType> |
installNode(org.apache.wicket.Component component,
org.wicketstuff.push.IPushEventHandler<EventType> handler) |
boolean |
isConnected(org.wicketstuff.push.IPushNode<?> node) |
<EventType> |
publish(org.wicketstuff.push.IPushChannel<EventType> channel,
EventType event) |
<EventType> |
publish(org.wicketstuff.push.IPushNode<EventType> node,
EventType event) |
<EventType> |
publishJavascript(CometdPushNode<EventType> node,
String javascript)
Directly sends JavaScript code to the node via a cometd channel without an additional Wicket
AJAX request roundtrip.
|
<EventType> |
publishJavascript(org.wicketstuff.push.PushChannel<EventType> channel,
String javascript)
Directly sends JavaScript code to all nodes listeing to the given push channel via a cometd
channel without an additional Wicket AJAX request roundtrip.
|
void |
uninstallNode(org.apache.wicket.Component component,
org.wicketstuff.push.IPushNode<?> node) |
public static CometdPushService get()
public static CometdPushService get(org.apache.wicket.protocol.http.WebApplication application)
public static org.wicketstuff.push.IPushServiceRef<CometdPushService> getRef()
public <EventType> CometdPushNode<EventType> installNode(org.apache.wicket.Component component, org.wicketstuff.push.IPushEventHandler<EventType> handler)
public boolean isConnected(org.wicketstuff.push.IPushNode<?> node)
public <EventType> void publish(org.wicketstuff.push.IPushChannel<EventType> channel,
EventType event)
public <EventType> void publish(org.wicketstuff.push.IPushNode<EventType> node,
EventType event)
public <EventType> void publishJavascript(CometdPushNode<EventType> node, String javascript)
public <EventType> void publishJavascript(org.wicketstuff.push.PushChannel<EventType> channel,
String javascript)
public void uninstallNode(org.apache.wicket.Component component,
org.wicketstuff.push.IPushNode<?> node)
Copyright © 2019. All rights reserved.