org.silvermoon.moonglow.plugin
Interface Plugin

All Known Implementing Classes:
BasePlugin

public interface Plugin

A Plugin is a pluggable data source. It should not matter whether this accesses a URL or a local repository, or even if the results are returned directly (from RAM). This uses an asynchronous model of fetching the data: the Client should call doRequest() only after registering a ResponseListener


Method Summary
 void addResponseListener(ResponseListener l)
          Register a listener for the Response
 void doRequest(int requestId, Request request)
          Perform a request, specifying a unique requestId
 java.lang.String getId()
          Get a unique identifier for this plugin
 void removeResponseListener(ResponseListener l)
          Deregister a ResponseListener
 

Method Detail

doRequest

public void doRequest(int requestId,
                      Request request)
               throws PluginException
Perform a request, specifying a unique requestId

PluginException

addResponseListener

public void addResponseListener(ResponseListener l)
Register a listener for the Response


removeResponseListener

public void removeResponseListener(ResponseListener l)
Deregister a ResponseListener


getId

public java.lang.String getId()
Get a unique identifier for this plugin