Class ISCMessageDispatcher

java.lang.Object
com.isomorphic.messaging.ISCMessageDispatcher

public abstract class ISCMessageDispatcher extends Object
This is the base local dispatcher - it is an abstract class that provides same-jvm registration management and channel subscriptions. Use it to obtain a concrete message dispatcher class.
  • Method Details

    • instance

      public static ISCMessageDispatcher instance() throws Exception
      Returns:
      concrete ISCMessageDispatcher class for sending/receiving Realtime Messages.
      Throws:
      Exception
    • instance

      public static ISCMessageDispatcher instance(RequestContext context) throws Exception
      Parameters:
      context -
      Returns:
      concrete ISCMessageDispatcher class capable of delivering responses to web browsers
      Throws:
      Exception
    • register

      public void register(ISubscriber subscriber) throws Exception
      register this subscriber
      Parameters:
      subscriber -
      Throws:
      Exception
    • unregister

      public void unregister(ISubscriber subscriber) throws Exception
      unregister this subscriber
      Parameters:
      subscriber -
      Throws:
      Exception
    • subscribe

      public void subscribe(ISubscriber subscriber, String channel) throws Exception
      subscribe a given subscriber to a given channel
      Parameters:
      subscriber -
      channel -
      Throws:
      Exception
    • subscribe

      public abstract void subscribe(ISubscriber subscriber, String channel, String selector) throws Exception
      subscribe a given subscriber to a given channel
      Parameters:
      subscriber -
      channel -
      selector -
      Throws:
      Exception
    • unsubscribe

      public abstract void unsubscribe(ISubscriber subscriber, String channel) throws Exception
      unsubscribe a given subscriber from a given channel
      Parameters:
      subscriber -
      channel -
      Throws:
      Exception
    • send

      public void send(ISCMessage msg) throws Exception
      send a message
      Parameters:
      msg -
      Throws:
      Exception
    • isSubscribed

      public boolean isSubscribed(ISubscriber subscriber, String channel) throws Exception
      Check to see if a given subscriber is subscribed to a given channel. Note: not applicable to JMS (meaningless in a distributed context)
      Parameters:
      subscriber -
      channel -
      Returns:
      true if subscribed, false if not
      Throws:
      Exception