Class NotificationListener


  • public class NotificationListener
    extends java.lang.Object
    The notification listener implements a client to the fanout, as very lightweight pub/sub server originally written for SparkleShare.

    Fanout implements a simple TCP-based plaintext protocol.
    It implements the following commands:

    • subcribe <channel>
    • unsubscribe <channel>
    • announce <channel> <message>

    Notifications have the following format:

    • <channel>!<message>

    The notification listener starts a thread and listens for incoming messages. Outgoing messages (subscribe/unsubscribe/announce) are sent directly or (if that fails), put in an outgoing queue. Incoming messages are handed over to a NotificationListener.NotificationListenerListener.

    See Also:
    https://github.com/travisghansen/fanout/ - Fanout source code by Travis G. Hansen