|
Generated: Sun Oct 7 15:19:11 BST 2007 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RunPlugIn
An interface defining behaviour of Gowlab-aware plugins that are able to fetch data from remote web sites. The interface is implemented by specialized plugin-classes in cases where fetching data needs more than just connect-and-fetch. For example:
Note that this interface is not meant to be used for
post-processing of results. It can do that, as well, but if you
need just to parse resulting data and convert them into something
else, implement rather DataAdaptPlugIn
interface.
Field Summary | |
---|---|
static java.lang.String |
DEBUG
Property name. |
static java.lang.String |
METHOD_GET
An allowed value of the property PREFERRED_METHOD . |
static java.lang.String |
METHOD_POST
An allowed value of the property PREFERRED_METHOD . |
static java.lang.String |
PREFERRED_METHOD
Property name. |
static java.lang.String |
RESULT_NAMES
Property name. |
static java.lang.String |
SERVICE_NAME
Property name. |
static java.lang.String |
XSLT_DIR
Property name. |
static java.lang.String |
XSLT_FILE
Property name. |
Method Summary | |
---|---|
void |
fetch(HTTPClient.HTTPConnection con,
HTTPClient.URI supplierURI,
HTTPClient.NVPair[] formData,
HTTPClient.NVPair[] files)
Send given data to a site using given connection, wait for an answer, and store results into given Result Manager. |
void |
setEventManager(org.embl.ebi.analysis.EventManager eventManager)
Set an Event Manager where this instance will report about the fetching. |
void |
setProperties(java.util.Properties analysisProps)
Set additional properties that can be useful during fetching data. |
void |
setResultManager(org.embl.ebi.analysis.ResultManager resultManager)
Set a Result Manager where this instance will store fetched data, and where it will report about a success or failure. |
Field Detail |
---|
static final java.lang.String DEBUG
static final java.lang.String PREFERRED_METHOD
METHOD_GET
and METHOD_POST
. Note that this
property is only a suggestion not a rule - the implementtaion
may know better how to deal with a particular web site.
static final java.lang.String METHOD_GET
PREFERRED_METHOD
.
static final java.lang.String METHOD_POST
PREFERRED_METHOD
.
static final java.lang.String SERVICE_NAME
fetch(HTTPClient.HTTPConnection, HTTPClient.URI, HTTPClient.NVPair[], HTTPClient.NVPair[])
method in order to use it in reports or
log messages, or simila.
static final java.lang.String RESULT_NAMES
An example how this property can be used is shown in the
default implementation of this interface (RunPlugInDefaultImpl
.
static final java.lang.String XSLT_FILE
An example how this property can be used is shown in the
implementation of this interface (RunPlugInXSLTImpl
.
static final java.lang.String XSLT_DIR
An example how this property can be used is shown in the
implementation of this interface (RunPlugInXSLTImpl
.
Method Detail |
---|
void setResultManager(org.embl.ebi.analysis.ResultManager resultManager)
resultManager
- to be setvoid setEventManager(org.embl.ebi.analysis.EventManager eventManager)
eventManager
- to be setvoid setProperties(java.util.Properties analysisProps)
analysisProps
- poperties to be setvoid fetch(HTTPClient.HTTPConnection con, HTTPClient.URI supplierURI, HTTPClient.NVPair[] formData, HTTPClient.NVPair[] files)
It does not throw any exception - instead it reports all problems to the ResultManager (setReport() and addToReport() methods). It also indicates success or failure by reporting an appropriate state to the ResultManager (setStatusResult() method).
con
- is an open connection to a site where to goformData
- are named values representing input data to be
sent (usually they correspond to data sent from an HTML form if
the page is accessed manually). Parameter may be null. Sometimes it is expected to send a query string instead of name/value pairs of data. This is simulated by using 'formData' with only one element, whose 'name' part is null. The 'value' part is used as a query string.
files
- represents files to be uploaded (together with the
'formData' they consitute full input data set). The data will be
sent using multipart/form-data encoding. Each pair represents
one file - the name refers to the 'name' attribute to be used
in the header of the part, and the value is the actual filename
(the file will be read and it's contents put in the body of
that part). Parameter may be null.
|
Generated: Sun Oct 7 15:19:11 BST 2007 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |