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(java.lang.String message)
          Displays a debug message tagged with the context ID.
 void debug(java.lang.String message, java.lang.Throwable t)
          Displays a debug message and exception tagged with the context ID.
 boolean executeInBrowser(java.lang.String javascript)
           
 java.lang.Object getBrowserData(java.lang.String key)
           
 long getContentNetworkID()
           
 BrowserMessageDispatcher getDispatcher()
           
 void removeMessageListener(BrowserMessageListener listener)
           
 void removeMessageListener(java.lang.String listenerId)
           
 boolean sendBrowserMessage(java.lang.String key, java.lang.String op)
          Sends a message to the JavaScript message dispatcher in the page.
 boolean sendBrowserMessage(java.lang.String key, java.lang.String op, java.util.Collection params)
           
 boolean sendBrowserMessage(java.lang.String key, java.lang.String op, java.util.Map params)
          Sends a message to the JavaScript message dispatcher in the page.
 void setBrowserData(java.lang.String key, java.lang.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(java.lang.String listenerId)

removeMessageListener

void removeMessageListener(BrowserMessageListener listener)

getBrowserData

java.lang.Object getBrowserData(java.lang.String key)

setBrowserData

void setBrowserData(java.lang.String key,
                    java.lang.Object value)

sendBrowserMessage

boolean sendBrowserMessage(java.lang.String key,
                           java.lang.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(java.lang.String key,
                           java.lang.String op,
                           java.util.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(java.lang.String javascript)

debug

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

Parameters:
message - sent to the debug log

debug

void debug(java.lang.String message,
           java.lang.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(java.lang.String key,
                           java.lang.String op,
                           java.util.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