|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MsgOwner
Implemented by classes that dispatch messages.
This class does not need to be in a public .api package.
Method Summary | |
---|---|
boolean |
allowExternalDispatch(Msg m)
Called if somebody tries to dispatch a message other than via the MessageDispatch class |
java.lang.String |
getFriendlyName()
Return a friendly name (for display to users) of the message, which is not used for other purposes. |
java.lang.Class<? extends Msg> |
getMessageClass()
Return the public class of messages dispatched by this object. |
void |
init(MessageDispatch md)
Called once the dispatcher is registered. |
void |
manualDispatch(Msg m)
Called when the dispatcher should handle manual dispatch of a message (to all targets for which it returned false in registerTarget). |
boolean |
registerTarget(java.lang.Object target,
java.lang.Class<? extends Msg> message,
MessageFilter mf,
int requestID,
int priority)
Called when a new target registers to receive messages from this class. |
void |
unregisterTarget(java.lang.Object target,
int requestID)
Called when a target unregisters. |
Method Detail |
---|
void init(MessageDispatch md)
md
- Provided by the system to handle message dispatch from this
dispatcherjava.lang.String getFriendlyName()
java.lang.Class<? extends Msg> getMessageClass()
boolean registerTarget(java.lang.Object target, java.lang.Class<? extends Msg> message, MessageFilter mf, int requestID, int priority)
target
- Targetmessage
- Class of desired message (null = all)mf
- Filter (may be null)requestID
- ID associated with this request (used in unregister)priority
- Priority for message
void unregisterTarget(java.lang.Object target, int requestID)
target
- TargetrequestID
- Identifier of the request to be removedvoid manualDispatch(Msg m)
It is up to the message owner to handle 'stopped' messages (m.isStopped) and not pass them on to further targets.
m
- Message being sentboolean allowExternalDispatch(Msg m)
m
- Message for dispatch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |