ch.bind.philib.msg.vm
Interface PubSub

All Known Implementing Classes:
PubSubVM

public interface PubSub


Method Summary
 Map<String,Integer> activeChannels()
          Lists all channels with one or more subscriptions.
 Subscription forward(PubSub pubsub, String fromChannelName, String toChannelName)
           
 Subscription forward(String fromChannelName, String toChannelName)
           
 void publishAsync(String channelName, Object message)
           
 void publishSync(String channelName, Object message)
           
 Subscription subscribe(String channelName, MessageHandler handler)
           
 

Method Detail

subscribe

Subscription subscribe(String channelName,
                       MessageHandler handler)

forward

Subscription forward(String fromChannelName,
                     String toChannelName)

forward

Subscription forward(PubSub pubsub,
                     String fromChannelName,
                     String toChannelName)

publishSync

void publishSync(String channelName,
                 Object message)

publishAsync

void publishAsync(String channelName,
                  Object message)

activeChannels

Map<String,Integer> activeChannels()
Lists all channels with one or more subscriptions.

Returns:
a Map with active channel names as key and the number of subscribers as value.


Copyright © 2013. All Rights Reserved.