public abstract class AbstractPushService extends Object implements IPushService
Modifier and Type | Field and Description |
---|---|
protected Set<IPushNodeDisconnectedListener> |
disconnectListeners |
protected ConcurrentHashMap<IPushChannel<?>,CopyOnWriteArraySet<IPushNode<?>>> |
nodesByChannels |
Constructor and Description |
---|
AbstractPushService() |
Modifier and Type | Method and Description |
---|---|
void |
addNodeDisconnectedListener(IPushNodeDisconnectedListener listener) |
<EventType> |
connectToChannel(IPushNode<EventType> node,
IPushChannel<EventType> channel)
Connects the given push node to the given push channel
|
<EventType> |
createChannel(String label)
Creates a new push channel with the given
label . |
protected void |
disconnectFromAllChannels(IPushNode<?> node) |
<EventType> |
disconnectFromChannel(IPushNode<EventType> node,
IPushChannel<EventType> channel) |
<EventType> |
removeChannel(IPushChannel<EventType> channel) |
void |
removeNodeDisconnectedListener(IPushNodeDisconnectedListener listener) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
installNode, isConnected, publish, publish, uninstallNode
protected final ConcurrentHashMap<IPushChannel<?>,CopyOnWriteArraySet<IPushNode<?>>> nodesByChannels
protected final Set<IPushNodeDisconnectedListener> disconnectListeners
public void addNodeDisconnectedListener(IPushNodeDisconnectedListener listener)
addNodeDisconnectedListener
in interface IPushService
public <EventType> void connectToChannel(IPushNode<EventType> node, IPushChannel<EventType> channel)
connectToChannel
in interface IPushService
public <EventType> IPushChannel<EventType> createChannel(String label)
label
.createChannel
in interface IPushService
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.
protected void disconnectFromAllChannels(IPushNode<?> node)
public <EventType> void disconnectFromChannel(IPushNode<EventType> node, IPushChannel<EventType> channel)
disconnectFromChannel
in interface IPushService
public <EventType> void removeChannel(IPushChannel<EventType> channel)
removeChannel
in interface IPushService
public void removeNodeDisconnectedListener(IPushNodeDisconnectedListener listener)
removeNodeDisconnectedListener
in interface IPushService
Copyright © 2015. All rights reserved.