Interface IPushService

    • Method Detail

      • 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)
      • 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)