org.cruxframework.crux.plugin.gadget.client.features.impl
Class PubsubFeatureImpl
java.lang.Object
org.cruxframework.crux.plugin.gadget.client.features.impl.PubsubFeatureImpl
- All Implemented Interfaces:
- PubsubFeature
public class PubsubFeatureImpl
- extends Object
- implements PubsubFeature
- Author:
- Thiago da Rosa de Bustamante
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
publish
public void publish(String channelName,
String message)
- Description copied from interface:
PubsubFeature
- Publish a message on the specified channel. All subscribers of the channel will be notified,
through its Callback objects.
- Specified by:
publish in interface PubsubFeature
subscribe
public void subscribe(String channelName,
PubsubFeature.Callback callback)
- Description copied from interface:
PubsubFeature
- Subscribes to the specified channel. Whenever any gadget publish some message to the channel,
the callback object will be informed (through onMessage() method).
- Specified by:
subscribe in interface PubsubFeature
unsubscribe
public void unsubscribe(String channelName)
- Description copied from interface:
PubsubFeature
- Unsubscribes from the specified channel. No more notifications will be received.
- Specified by:
unsubscribe in interface PubsubFeature
Copyright © 2014. All rights reserved.