Package org.wicketstuff.push
Interface IPushService
-
- All Known Implementing Classes:
AbstractPushService
public interface IPushService- Author:
- Sebastian Thomschke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddNodeDisconnectedListener(IPushNodeDisconnectedListener listener)<EventType>
voidconnectToChannel(IPushNode<EventType> node, IPushChannel<EventType> channel)Connects the given push node to the given push channel<EventType>
IPushChannel<EventType>createChannel(String label)Creates a new push channel with the givenlabel.<EventType>
voiddisconnectFromChannel(IPushNode<EventType> node, IPushChannel<EventType> channel)<EventType>
IPushNode<EventType>installNode(Component component, IPushEventHandler<EventType> handler)booleanisConnected(IPushNode<?> node)Determines if the node (client) is still connected, otherwise clears all queued events.<EventType>
voidpublish(IPushChannel<EventType> channel, EventType event)<EventType>
voidpublish(IPushNode<EventType> node, EventType event)Queues the given event for later processing by the associatedIPushEventHandler.<EventType>
voidremoveChannel(IPushChannel<EventType> channel)voidremoveNodeDisconnectedListener(IPushNodeDisconnectedListener listener)voiduninstallNode(Component component, IPushNode<?> node)
-
-
-
Method Detail
-
addNodeDisconnectedListener
void addNodeDisconnectedListener(IPushNodeDisconnectedListener listener)
-
connectToChannel
<EventType> void connectToChannel(IPushNode<EventType> node, IPushChannel<EventType> channel)
Connects the given push node to the given push channel- Throws:
IllegalArgumentException- ifchannelis unknown
-
createChannel
<EventType> IPushChannel<EventType> createChannel(String label)
Creates a new push channel with the givenlabel.- Parameters:
label- the label to associate with the new push channel. (may be null)Note: The
labelhas only informative purpose. Creating two push channels with the same label will not result in an error.
-
disconnectFromChannel
<EventType> void disconnectFromChannel(IPushNode<EventType> node, IPushChannel<EventType> channel)
-
installNode
<EventType> IPushNode<EventType> installNode(Component component, IPushEventHandler<EventType> handler)
-
isConnected
boolean isConnected(IPushNode<?> node)
Determines if the node (client) is still connected, otherwise clears all queued events.
-
publish
<EventType> void publish(IPushChannel<EventType> channel, EventType event)
-
publish
<EventType> void publish(IPushNode<EventType> node, EventType event)
Queues the given event for later processing by the associatedIPushEventHandler. The method does nothing in case the node is no longer connected.
-
removeChannel
<EventType> void removeChannel(IPushChannel<EventType> channel)
-
removeNodeDisconnectedListener
void removeNodeDisconnectedListener(IPushNodeDisconnectedListener listener)
-
-