com.isomorphic.messaging

## Class ISCMessageDispatcher

- com.isomorphic.messaging.ISCMessageDispatcher

-     public abstract class ISCMessageDispatcher

  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 Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ISCMessageDispatcher` | `instance()` returns a concrete ISCMessageDispatcher class capable of delivering responses within the JVM
    `static ISCMessageDispatcher` | `instance(RequestContext context)` returns a concrete ISCMessageDispatcher class capable of delivering responses to web browsers
    `boolean` | `isSubscribed(ISubscriber s, java.lang.String channel)` check to see if a given subscriber is subscribed to a given channel
    `void` | `register(ISubscriber s)` register this subscriber
    `void` | `send(ISCMessage msg)` send a message
    `void` | `subscribe(ISubscriber s, java.lang.String channel)` subscribe a given subscriber to a given channel
    `void` | `unregister(ISubscriber s)` unregister this subscriber
    `void` | `unsubscribe(ISubscriber s, java.lang.String channel)` unsubscribe a given subscriber from a given channel

- - ### Method Detail

    - #### instance

          public static ISCMessageDispatcher instance(RequestContext context)
                                               throws java.lang.Exception

      returns a concrete ISCMessageDispatcher class capable of delivering responses to web browsers
      Parameters:
        `context` -
      Returns:
      Throws:
        `java.lang.Exception`

    - #### instance

          public static ISCMessageDispatcher instance()
                                               throws java.lang.Exception

      returns a concrete ISCMessageDispatcher class capable of delivering responses within the JVM
      Returns:
      Throws:
        `java.lang.Exception`

    - #### register

          public void register(ISubscriber s)
                        throws java.lang.Exception

      register this subscriber
      Parameters:
        `s` -
      Throws:
        `java.lang.Exception`

    - #### unregister

          public void unregister(ISubscriber s)
                          throws java.lang.Exception

      unregister this subscriber
      Parameters:
        `s` -
      Throws:
        `java.lang.Exception`

    - #### subscribe

          public void subscribe(ISubscriber s,
                       java.lang.String channel)
                         throws java.lang.Exception

      subscribe a given subscriber to a given channel
      Parameters:
        `s` -
        `channel` -
      Throws:
        `java.lang.Exception`

    - #### unsubscribe

          public void unsubscribe(ISubscriber s,
                         java.lang.String channel)
                           throws java.lang.Exception

      unsubscribe a given subscriber from a given channel
      Parameters:
        `s` -
        `channel` -
      Throws:
        `java.lang.Exception`

    - #### send

          public void send(ISCMessage msg)
                    throws java.lang.Exception

      send a message
      Parameters:
        `msg` -
      Throws:
        `java.lang.Exception`

    - #### isSubscribed

          public boolean isSubscribed(ISubscriber s,
                             java.lang.String channel)
                               throws java.lang.Exception

      check to see if a given subscriber is subscribed to a given channel
      Parameters:
        `s` -
        `channel` -
      Returns:
      Throws:
        `java.lang.Exception`