|
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 AnalysisWS
An interface to a Web Service accessing and controlling an analysis (an analysis is a remote program, mostly a command-line program).
runNotifiable(java.lang.String, java.lang.String)
createAndRun(java.util.Map)
createAndRunNotifiable(java.util.Map, java.lang.String)
runAndWaitFor(java.util.Map)
getSomeResults(java.lang.String, java.lang.String[])
getResultSpec()
changed its signature, it
returns now Map[] - the same data type as other
methods returning metadata. Sorry for the previous wrong
design...
AnalysisFactoryWS
Field Summary | |
---|---|
static java.lang.String |
ANALYSIS_DESCRIPTION
A property name for an analysis description. |
static java.lang.String |
ANALYSIS_HELP_URL
A property name for an analysis URL with a detailed help. |
static java.lang.String |
ANALYSIS_INSTALLATION
A property name for an analysis installation. |
static java.lang.String |
ANALYSIS_NAME
A property name for an analysis name. |
static java.lang.String |
ANALYSIS_SUPPLIER
A property name for an analysis supplier. |
static java.lang.String |
ANALYSIS_TYPE
A property name for an analysis type. |
static java.lang.String |
ANALYSIS_VERSION
A property name for an analysis version. |
static java.lang.String |
DATA_HELP
A property name of a data attribute. |
static java.lang.String |
DATA_PROMPT
A property name of a data attribute. |
static java.lang.String |
DATA_SEMANTIC_TYPE
A property name of a data attribute. |
static java.lang.String |
DATA_SEMANTIC_TYPE_2
A property name of a data attribute. |
static java.lang.String |
DATA_SYNTAX_TYPE
A property name of a data attribute. |
static java.lang.String |
FAULT_NOT_FOUND
A fault string. |
static java.lang.String |
FAULT_NOT_IMPLEMENTED
A fault string. |
static java.lang.String |
FAULT_NOT_RUNNABLE
A fault string. |
static java.lang.String |
FAULT_NOT_RUNNING
A fault string. |
static java.lang.String |
FAULT_NOT_TERMINATED
A fault string. |
static java.lang.String |
FAULT_NOT_VALID_INPUTS
A fault string. |
static java.lang.String |
FAULT_NOTIFY_UNACCEPTED
A fault string. |
static java.lang.String |
FAULT_UNKNOWN_NAME
A fault string. |
static java.lang.String |
INPUT_ALLOWED_VALUES
A property name of a data input. |
static java.lang.String |
INPUT_DEFAULT_VALUE
A property name of a data input. |
static java.lang.String |
INPUT_MANDATORY
A property name of a data input. |
static java.lang.String |
INPUT_NAME
A property name of a data input. |
static java.lang.String |
INPUT_TYPE
A property name of a data input. |
static java.lang.String |
JOB_COMPLETED
A job status: Job has completed execution. |
static java.lang.String |
JOB_CREATED
A job status: Job has been created but not yet executed. |
static java.lang.String |
JOB_RUNNING
A job status: Job is running. |
static java.lang.String |
JOB_TERMINATED_BY_ERROR
A job status: Job was terminated due to an error. |
static java.lang.String |
JOB_TERMINATED_BY_REQUEST
A job status: Job was terminated by user request. |
static java.lang.String |
RESULT_NAME
A property name of a data output (a result). |
static java.lang.String |
RESULT_TYPE
A property name of a data output (a result). |
Method Summary | |
---|---|
java.lang.String |
createAndRun(java.util.Map inputs)
A convenient combination of methods createJob(java.util.Map) and
run . |
java.lang.String |
createAndRunNotifiable(java.util.Map inputs,
java.lang.String notificationDescriptor)
The same as createAndRun(java.util.Map) with addition of the
channel notification negotiation. |
java.lang.String |
createJob(java.util.Map inputs)
Prepare a job with given input data but do not start it. |
java.lang.String |
describe()
Return an XML string containing metadata describing this analysis service. |
void |
destroy(java.lang.String jobID)
Release related resources, including results. |
java.util.Map |
getAnalysisType()
Return attributes describing this analysis. |
java.util.Map |
getCharacteristics(java.lang.String jobID)
A convenient method combining together methods getCreated(java.lang.String) , getStarted(java.lang.String) ,
getEnded(java.lang.String) and getElapsed(java.lang.String) . |
long |
getCreated(java.lang.String jobID)
Return a creation time of the given job. |
long |
getElapsed(java.lang.String jobID)
Return the elapsed time of the execution of the given job (in milliseconds). |
long |
getEnded(java.lang.String jobID)
Return time when the given job ended. |
java.util.Map[] |
getInputSpec()
Return information about all possible data inputs. |
java.lang.String |
getLastEvent(java.lang.String jobID)
Return the last event which happened to the given job. |
java.lang.String |
getNotificationDescriptor(java.lang.String jobID)
Return an XML string describing location and available protocol (or even protocols) of a notification channel which will have messages regarding given job. |
java.util.Map |
getResults(java.lang.String jobID)
Return all (available) results from the given job. |
java.util.Map[] |
getResultSpec()
Return information about all possible results. |
java.util.Map |
getSomeResults(java.lang.String jobID,
java.lang.String[] resultNames)
Return named (and available) results from the given job. |
long |
getStarted(java.lang.String jobID)
Return time when the given job started. |
java.lang.String |
getStatus(java.lang.String jobID)
Return a string describing the current job status. |
void |
run(java.lang.String jobID)
Start an underlying analysis and return immediately, without waiting for its completion. |
java.util.Map |
runAndWaitFor(java.util.Map inputs)
Block the client until the underlying running analysis is completed and return immediately all results. |
void |
runNotifiable(java.lang.String jobID,
java.lang.String notificationDescriptor)
The same as run(java.lang.String) with addition of the
channel notification negotiation. |
void |
terminate(java.lang.String jobID)
Terminate the running analysis, identified by its job ID. |
void |
waitFor(java.lang.String jobID)
Block the client until the underlying running analysis is completed. |
Field Detail |
---|
static final java.lang.String FAULT_NOT_FOUND
static final java.lang.String FAULT_NOT_RUNNABLE
static final java.lang.String FAULT_NOT_RUNNING
static final java.lang.String FAULT_NOT_VALID_INPUTS
static final java.lang.String FAULT_NOT_TERMINATED
static final java.lang.String FAULT_UNKNOWN_NAME
static final java.lang.String FAULT_NOTIFY_UNACCEPTED
static final java.lang.String FAULT_NOT_IMPLEMENTED
static final java.lang.String ANALYSIS_TYPE
static final java.lang.String ANALYSIS_NAME
static final java.lang.String ANALYSIS_SUPPLIER
static final java.lang.String ANALYSIS_VERSION
static final java.lang.String ANALYSIS_INSTALLATION
static final java.lang.String ANALYSIS_DESCRIPTION
static final java.lang.String ANALYSIS_HELP_URL
static final java.lang.String INPUT_TYPE
static final java.lang.String INPUT_NAME
static final java.lang.String INPUT_ALLOWED_VALUES
static final java.lang.String INPUT_DEFAULT_VALUE
static final java.lang.String INPUT_MANDATORY
static final java.lang.String DATA_HELP
static final java.lang.String DATA_PROMPT
static final java.lang.String DATA_SEMANTIC_TYPE
static final java.lang.String DATA_SEMANTIC_TYPE_2
static final java.lang.String DATA_SYNTAX_TYPE
static final java.lang.String RESULT_TYPE
static final java.lang.String RESULT_NAME
static final java.lang.String JOB_CREATED
static final java.lang.String JOB_RUNNING
static final java.lang.String JOB_COMPLETED
static final java.lang.String JOB_TERMINATED_BY_REQUEST
static final java.lang.String JOB_TERMINATED_BY_ERROR
Method Detail |
---|
java.lang.String describe() throws SoaplabException
SoaplabException
- if communication with the service failsjava.util.Map[] getInputSpec() throws SoaplabException
Each Map element should have at least keys name
and type
defining input data name and its Java type. An implementation can
choose to provide more characteristics. Typically they are:
Key | Type | Note |
---|---|---|
name | String |
A name of analysis data input.
The input names are needed when a job is created and fed with the input data
(see methods createJob(java.util.Map) or runAndWaitFor(java.util.Map) ).
|
type | String | A type of this data input. Expressed as Java type (e.g. String, or byte[][]). |
allowed_values | String[] | A list of possible (allowed, expected) values for this data input. (Note that the values are here always as Strings. This may be rectify later.) |
mandatory | String | The true is this data input must be present when the analysis starts. Otherwise there is false here, or this key is missing at all. |
default | String | A default value used when no data given for this data input. (The same note applies as for allowed_values above.) |
This is just a convenient method retrieving the same data (but only part of it)
as method describe()
but without need to parse any XML stream.
SoaplabException
- if communication with the service failsjava.util.Map[] getResultSpec() throws SoaplabException
Each Map element should have at least keys name
and type
defining result name and its Java type. An implementation can
choose to provide more characteristics. Typically they are:
Key | Type | Note |
---|---|---|
name | String |
A name of analysis result.
The result names are needed when asking a job to retrieve output data
(see method getResults(java.lang.String) ).
|
type | String | A type of this result. Expressed as Java type (e.g. String, or byte[][]). |
This is just a convenient method retrieving the same data (but only part of it)
as method describe()
but without need to parse any XML stream.
The result names can be used to retrieve only some, named, results from
a job representing an execution of this analysis
(see method getResults(java.lang.String)
).
SoaplabException
- if communication with the service failsjava.util.Map getAnalysisType() throws SoaplabException
describe()
but without need to parse any XML stream.
SoaplabException
- if communication with the service failsjava.lang.String createJob(java.util.Map inputs) throws SoaplabException
run
) to start and to control the
job.
getInputSpec()
. The
values are any objects - but an implementation may limit the
types which are recognized.
SoaplabException
- if communication with the service fails,
or more specifically
(see defining exceptions) using:
FAULT_UNKNOWN_NAME
if there is
an unrecognized input name
FAULT_NOT_VALID_INPUTS
if
the input data are invalid (e.g. they do not follow
some inter-data dependency conditions)
void run(java.lang.String jobID) throws SoaplabException
createJob(java.util.Map)
. With the same
jobID it can be run only once. It raises a
NotRunnableSoaplabException if there is an attempt to start it
more than once.
SoaplabException
- if communication with the service fails,
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given job ID
does not exist
FAULT_NOT_RUNNABLE
if the same job was alredy executed, or
if the data given previously by createJob(java.util.Map)
do not exist or are not accessible anymore
void runNotifiable(java.lang.String jobID, java.lang.String notificationDescriptor) throws SoaplabException
run(java.lang.String)
with addition of the
channel notification negotiation.
See details here.
SoaplabException
- as in run(java.lang.String)
plus
(see defining exceptions) using:
FAULT_NOTIFY_UNACCEPTED
if the server does not agree on using the proposed
notification channel
java.lang.String createAndRun(java.util.Map inputs) throws SoaplabException
createJob(java.util.Map)
and
run
. See
how to specify input data.
SoaplabException
- if communication with the service fails,
or more specifically
(see defining exceptions) using:
FAULT_UNKNOWN_NAME
if there is
an unrecognized input name
FAULT_NOT_VALID_INPUTS
if
the input data are invalid (e.g. they do not follow
some inter-data dependency conditions)
java.lang.String createAndRunNotifiable(java.util.Map inputs, java.lang.String notificationDescriptor) throws SoaplabException
createAndRun(java.util.Map)
with addition of the
channel notification negotiation.
See details here.
SoaplabException
- as in createAndRun(java.util.Map)
plus
(see defining exceptions) using:
FAULT_NOTIFY_UNACCEPTED
if the server does not agree on using the proposed
notification channel
void waitFor(java.lang.String jobID) throws SoaplabException
Note that this method keeps an open connection with the server until the job is finished which may be for quite a long time. Therefore, an implementation may refuse this request by throwing an exception. Also even if the implementation allows there may be some time-outs set by other components (e.g. a proxy server) which may make this request unreliable. See notification for an alternative.
SoaplabException
- if communication with the service fails,
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
FAULT_NOT_IMPLEMENTED
if the
implementation refuses this request
java.util.Map runAndWaitFor(java.util.Map inputs) throws SoaplabException
This is designed for a full state-less server implementation - however, see the note about dangers.
Note that by using this method there is no way how to get additional information usually passed by a notification channel (e.g. events happenning during the job life-cycle). A service implementation should consider to pass some of those as an additional result (e.g. termination status/code).
getResults(java.lang.String)
)
SoaplabException
- if communication with the service fails,
or more specifically
(see defining exceptions) using:
FAULT_UNKNOWN_NAME
if there is
an unrecognized input name
FAULT_NOT_VALID_INPUTS
if
the input data are invalid (e.g. they do not follow
some inter-data dependency conditions)
FAULT_NOT_IMPLEMENTED
if the
implementation refuses this request
void terminate(java.lang.String jobID) throws SoaplabException
SoaplabException
- if communication with the service fails,
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
FAULT_NOT_RUNNING
if the given
job was not yet started (note that this exception
is not raised when the job had been already
finished - from any reasons)
FAULT_NOT_TERMINATED
if the given
analysis is not interruptible from some reason
java.lang.String getLastEvent(java.lang.String jobID) throws SoaplabException
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
java.lang.String getNotificationDescriptor(java.lang.String jobID) throws SoaplabException
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
java.lang.String getStatus(java.lang.String jobID) throws SoaplabException
CREATED
- job has been created but not yet executed
RUNNING
- job is running
COMPLETED
- job has completed execution
TERMINATED_BY_REQUEST
- job was terminated by user request
TERMINATED_BY_ERROR
- job was terminated due to an error
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
long getCreated(java.lang.String jobID) throws SoaplabException
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
long getStarted(java.lang.String jobID) throws SoaplabException
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
long getEnded(java.lang.String jobID) throws SoaplabException
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
long getElapsed(java.lang.String jobID) throws SoaplabException
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
java.util.Map getCharacteristics(java.lang.String jobID) throws SoaplabException
getCreated(java.lang.String)
, getStarted(java.lang.String)
,
getEnded(java.lang.String)
and getElapsed(java.lang.String)
.
It returns a Map with keys equals to the individual
method names (without prefix 'get', and in lowercase).
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
java.util.Map getResults(java.lang.String jobID) throws SoaplabException
getResultSpec()
. The
values are any objects - but an implementation may limit the
types which are recognized.
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
java.util.Map getSomeResults(java.lang.String jobID, java.lang.String[] resultNames) throws SoaplabException
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
FAULT_UNKNOWN_NAME
if there
is an unrecognized result name
void destroy(java.lang.String jobID) throws SoaplabException
SoaplabException
- if communication with the service fails
or more specifically
(see defining exceptions) using:
FAULT_NOT_FOUND
if the given
job ID does not exist
|
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 |