org.wicketstuff.push
Class AbstractPushService

java.lang.Object
  extended by org.wicketstuff.push.AbstractPushService
All Implemented Interfaces:
IPushService

public abstract class AbstractPushService
extends Object
implements IPushService

Author:
Sebastian Thomschke

Field Summary
protected  ConcurrentHashMap<IPushChannel<?>,CopyOnWriteArraySet<IPushNode<?>>> nodesByChannels
           
 
Constructor Summary
AbstractPushService()
           
 
Method Summary
<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.
protected  void disconnectFromAllChannels(IPushNode<?> node)
           
<EventType>
void
disconnectFromChannel(IPushNode<EventType> node, IPushChannel<EventType> channel)
          
<EventType>
void
removeChannel(IPushChannel<EventType> channel)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.wicketstuff.push.IPushService
addNodeDisconnectedListener, installNode, isConnected, publish, publish, removeNodeDisconnectedListener, uninstallNode
 

Field Detail

nodesByChannels

protected final ConcurrentHashMap<IPushChannel<?>,CopyOnWriteArraySet<IPushNode<?>>> nodesByChannels
Constructor Detail

AbstractPushService

public AbstractPushService()
Method Detail

connectToChannel

public <EventType> void connectToChannel(IPushNode<EventType> node,
                                         IPushChannel<EventType> channel)
Connects the given push node to the given push channel

Specified by:
connectToChannel in interface IPushService

createChannel

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

Specified by:
createChannel in interface IPushService
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.


disconnectFromAllChannels

protected void disconnectFromAllChannels(IPushNode<?> node)

disconnectFromChannel

public <EventType> void disconnectFromChannel(IPushNode<EventType> node,
                                              IPushChannel<EventType> channel)

Specified by:
disconnectFromChannel in interface IPushService

removeChannel

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

Specified by:
removeChannel in interface IPushService


Copyright © 2011. All Rights Reserved.