Package com.isomorphic.messaging
Class ISCMessageDispatcher
java.lang.Object
com.isomorphic.messaging.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
Modifier and TypeMethodDescriptionstatic ISCMessageDispatcherinstance()static ISCMessageDispatcherinstance(RequestContext context) booleanisSubscribed(ISubscriber subscriber, String channel) Check to see if a given subscriber is subscribed to a given channel.voidregister(ISubscriber subscriber) register this subscribervoidsend(ISCMessage msg) send a messagevoidsubscribe(ISubscriber subscriber, String channel) subscribe a given subscriber to a given channelabstract voidsubscribe(ISubscriber subscriber, String channel, String selector) subscribe a given subscriber to a given channelvoidunregister(ISubscriber subscriber) unregister this subscriberabstract voidunsubscribe(ISubscriber subscriber, String channel) unsubscribe a given subscriber from a given channel
-
Method Details
-
instance
- Returns:
- concrete ISCMessageDispatcher class for sending/receiving Realtime Messages.
- Throws:
Exception
-
instance
- Parameters:
context-- Returns:
- concrete ISCMessageDispatcher class capable of delivering responses to web browsers
- Throws:
Exception
-
register
register this subscriber- Parameters:
subscriber-- Throws:
Exception
-
unregister
unregister this subscriber- Parameters:
subscriber-- Throws:
Exception
-
subscribe
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
unsubscribe a given subscriber from a given channel- Parameters:
subscriber-channel-- Throws:
Exception
-
send
send a message- Parameters:
msg-- Throws:
Exception
-
isSubscribed
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
-