|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.ui.swt.browser.msg.MessageDispatcherSWT
public class MessageDispatcherSWT
Dispatches messages to listeners registered with unique IDs.
Constructor Summary | |
---|---|
MessageDispatcherSWT(ClientMessageContext context)
Registers itself as a listener to receive sequence number reset message. |
Method Summary | |
---|---|
void |
addListener(BrowserMessageListener listener)
Registers the given listener for the given ID. |
void |
deregisterBrowser(BrowserWrapper browser)
Detaches this dispatcher from the given Browser . |
void |
dispatch(BrowserMessage message)
Dispatches the given message to the appropriate listener. |
BrowserMessageListener |
getListener(String id)
Returns the listener with the given ID. |
void |
registerBrowser(BrowserWrapper browser)
|
void |
removeListener(BrowserMessageListener listener)
Deregisters the listener with the given ID. |
void |
removeListener(String id)
Deregisters the listener with the given ID. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageDispatcherSWT(ClientMessageContext context)
Method Detail |
---|
public void registerBrowser(BrowserWrapper browser)
public void deregisterBrowser(BrowserWrapper browser)
Browser
.
This dispatcher listens for dispose events from the browser
and calls this method in response.
browser
- Browser
which will no longer send messagespublic void addListener(BrowserMessageListener listener)
addListener
in interface BrowserMessageDispatcher
id
- unique identifier used when dispatching messageslistener
- receives messages targetted at the given ID
IllegalStateException
- if another listener is already registered under the same IDpublic void removeListener(BrowserMessageListener listener)
removeListener
in interface BrowserMessageDispatcher
id
- unique identifier of the listener to be removedpublic void removeListener(String id)
removeListener
in interface BrowserMessageDispatcher
id
- unique identifier of the listener to be removedpublic BrowserMessageListener getListener(String id)
BrowserMessageDispatcher
getListener
in interface BrowserMessageDispatcher
id
- unique identifier of the listener to be returned
public void dispatch(BrowserMessage message)
BrowserMessageDispatcher
dispatch
in interface BrowserMessageDispatcher
message
- holds the listener ID, operation ID and parameters
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |