|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.core.messenger.browser.listeners.AbstractBrowserMessageListener
public abstract class AbstractBrowserMessageListener
Accepts and handles messages dispatched from BrowserMessageDispatcher
.
Subclasses should use the message's operation ID and parameters to perform
the requested operation.
Field Summary | |
---|---|
protected ClientMessageContext |
context
|
Constructor Summary | |
---|---|
AbstractBrowserMessageListener(String id)
Stores the given context for accessing the browser and its services. |
Method Summary | |
---|---|
protected void |
debug(String message)
Displays a debug message tagged with the listener ID. |
void |
debug(String message,
Throwable t)
Displays a debug message and exception tagged with the listener ID. |
ClientMessageContext |
getContext()
Returns the context for this listener. |
String |
getId()
Returns the unique ID for this listener. |
abstract void |
handleMessage(BrowserMessage message)
Handles the given message, usually by parsing the parameters and calling the appropriate operation. |
void |
setContext(ClientMessageContext context)
Sets the context for this listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ClientMessageContext context
Constructor Detail |
---|
public AbstractBrowserMessageListener(String id)
context
- used to access the browserMethod Detail |
---|
protected void debug(String message)
message
- sent to the debug logpublic void debug(String message, Throwable t)
message
- sent to the debug logt
- exception to log with messagepublic ClientMessageContext getContext()
getContext
in interface BrowserMessageListener
public String getId()
getId
in interface BrowserMessageListener
public abstract void handleMessage(BrowserMessage message)
handleMessage
in interface BrowserMessageListener
message
- holds all message informationpublic void setContext(ClientMessageContext context)
setContext
in interface BrowserMessageListener
context
- the new context for this listener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |