org.wicketstuff.push
Interface IPushService

All Known Implementing Classes:
AbstractPushService

public interface IPushService

Author:
Sebastian Thomschke

Method Summary
 void addNodeDisconnectedListener(IPushNodeDisconnectedListener listener)
           
<EventType>
void
connectToChannel(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 given label.
<EventType>
void
disconnectFromChannel(IPushNode<EventType> node, IPushChannel<EventType> channel)
           
<EventType>
IPushNode<EventType>
installNode(Component component, IPushEventHandler<EventType> handler)
           
 boolean isConnected(IPushNode<?> node)
          Determines if the node (client) is still connected, otherwise clears all queued events.
<EventType>
void
publish(IPushChannel<EventType> channel, EventType event)
           
<EventType>
void
publish(IPushNode<EventType> node, EventType event)
          Queues the given event for later processing by the associated IPushEventHandler.
<EventType>
void
removeChannel(IPushChannel<EventType> channel)
           
 void removeNodeDisconnectedListener(IPushNodeDisconnectedListener listener)
           
 void uninstallNode(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 - if channel is unknown

createChannel

<EventType> IPushChannel<EventType> createChannel(String label)
Creates a new push channel with the given label.

Parameters:
label - the label to associate with the new push channel. (may be null)

Note: The label has 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 associated IPushEventHandler. The method does nothing in case the node is no longer connected.


removeChannel

<EventType> void removeChannel(IPushChannel<EventType> channel)

removeNodeDisconnectedListener

void removeNodeDisconnectedListener(IPushNodeDisconnectedListener listener)

uninstallNode

void uninstallNode(Component component,
                   IPushNode<?> node)


Copyright © 2013. All Rights Reserved.