leafchat.core.api
Interface MessageDispatch


public interface MessageDispatch

Provided by the system to MessageOwner classes. Used by those objects to actually dispatch messages.


Method Summary
 void dispatchMessage(Msg m, boolean immediate)
          Dispatches a message.
 void dispatchMessageHandleErrors(Msg m, boolean immediate)
          Does exactly the same as dispatchMessage but without throwing exceptions.
 

Method Detail

dispatchMessage

void dispatchMessage(Msg m,
                     boolean immediate)
Dispatches a message. Will first call the MessageOwner's manualDispatch method, then dispatch to all system-handled targets.

Parameters:
m - Message for dispatch
immediate - True if message should be sent to all targets immediately before this message returns; false if it should be queued for later sending after other messages have been handled
Throws:
BugException - If the message owner has been lost

dispatchMessageHandleErrors

void dispatchMessageHandleErrors(Msg m,
                                 boolean immediate)
Does exactly the same as dispatchMessage but without throwing exceptions.

Parameters:
m - Message for dispatch
immediate - True if it should be sent before return, false if it should be queued (if in doubt, use false)


Copyright © 2011 Samuel Marshall. All rights reserved.