com.aelitis.azureus.core.messenger
Interface ClientMessageContext

All Known Implementing Classes:
BrowserContext, ClientMessageContextImpl

public interface ClientMessageContext

Author:
TuxPaper

Nested Class Summary
static interface ClientMessageContext.torrentURLHandler
           
 
Method Summary
 void addMessageListener(BrowserMessageListener listener)
           
 void debug(String message)
          Displays a debug message tagged with the context ID.
 void debug(String message, Throwable t)
          Displays a debug message and exception tagged with the context ID.
 boolean executeInBrowser(String javascript)
           
 Object getBrowserData(String key)
           
 long getContentNetworkID()
           
 BrowserMessageDispatcher getDispatcher()
           
 void removeMessageListener(BrowserMessageListener listener)
           
 void removeMessageListener(String listenerId)
           
 boolean sendBrowserMessage(String key, String op)
          Sends a message to the JavaScript message dispatcher in the page.
 boolean sendBrowserMessage(String key, String op, Collection params)
           
 boolean sendBrowserMessage(String key, String op, Map params)
          Sends a message to the JavaScript message dispatcher in the page.
 void setBrowserData(String key, Object value)
           
 void setContentNetworkID(long id)
           
 void setMessageDispatcher(BrowserMessageDispatcher dispatcher)
           
 void setTorrentURLHandler(ClientMessageContext.torrentURLHandler handler)
           
 

Method Detail

addMessageListener

void addMessageListener(BrowserMessageListener listener)

removeMessageListener

void removeMessageListener(String listenerId)

removeMessageListener

void removeMessageListener(BrowserMessageListener listener)

getBrowserData

Object getBrowserData(String key)

setBrowserData

void setBrowserData(String key,
                    Object value)

sendBrowserMessage

boolean sendBrowserMessage(String key,
                           String op)
Sends a message to the JavaScript message dispatcher in the page.

Parameters:
key - identifies the listener to receive the message
op - identifies the operation to perform

sendBrowserMessage

boolean sendBrowserMessage(String key,
                           String op,
                           Map params)
Sends a message to the JavaScript message dispatcher in the page.

Parameters:
key - identifies the listener to receive the message
op - identifies the operation to perform
params - optional message parameters

executeInBrowser

boolean executeInBrowser(String javascript)

debug

void debug(String message)
Displays a debug message tagged with the context ID.

Parameters:
message - sent to the debug log

debug

void debug(String message,
           Throwable t)
Displays a debug message and exception tagged with the context ID.

Parameters:
message - sent to the debug log
t - exception to log with message

getDispatcher

BrowserMessageDispatcher getDispatcher()

sendBrowserMessage

boolean sendBrowserMessage(String key,
                           String op,
                           Collection params)
Parameters:
key -
op -
params -
Returns:
Since:
3.0.1.5

setMessageDispatcher

void setMessageDispatcher(BrowserMessageDispatcher dispatcher)
Parameters:
dispatcher -
Since:
3.0.5.3

setTorrentURLHandler

void setTorrentURLHandler(ClientMessageContext.torrentURLHandler handler)

setContentNetworkID

void setContentNetworkID(long id)
Parameters:
contentNetwork -
Since:
4.0.0.5

getContentNetworkID

long getContentNetworkID()
Returns:
Since:
4.0.0.5