org.embl.ebi.escience.scuflworkers.soaplab
Class SoaplabProcessor

java.lang.Object
  extended by org.embl.ebi.escience.scufl.Processor
      extended by org.embl.ebi.escience.scuflworkers.soaplab.SoaplabProcessor
All Implemented Interfaces:
java.io.Serializable, IProcessor, HTMLSummarisableProcessor

public class SoaplabProcessor
extends Processor
implements java.io.Serializable, HTMLSummarisableProcessor

A processor based on the Soaplab web service around the EMBOSS tools. This processor implementation will contact Soaplab in order to find the list of extant ports at creation time. It is therefore important when creating an instance of this class that the creating thread should be able to make an HTTP connection to the supplied endpoint.

Author:
Tom Oinn
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.embl.ebi.escience.scufl.IProcessor
ENACTOR
 
Constructor Summary
SoaplabProcessor(ScuflModel model, java.lang.String name, java.lang.String endpoint)
          Construct a new processor with the given model and name, delegates to the superclass.
 
Method Summary
 void generatePorts()
          Use the endpoint data to create new ports and attach them to the processor.
 java.lang.String getAppName()
           
 java.lang.String getCategory()
           
 void getDescriptionText()
          Use the endpoint data to set the description field
 java.net.URL getEndpoint()
          Get the URL for this endpoint
 java.lang.String getHTMLSummary(java.util.List<HTMLSummarisableProcessor> processors, java.util.Map<java.lang.String,Processor> names)
          Generates the html tables for a list of processors, creating a table grouped by resource host.
 int getMaximumWorkers()
          Return the maximum number of task implementations that should be launched for this processor.
 double getPollingBackoff()
           
 int getPollingInterval()
           
 int getPollingIntervalMax()
           
 java.util.Properties getProperties()
          Get the properties for this processor for display purposes
 java.lang.String getResourceHost()
          If meaningful, obtain the host that the resource is based in.
 java.lang.String getServicePath()
           
 int htmlTablePlacement()
          int indicating the placement for this type of processor in the order of tables displayed
 boolean isPollingDefined()
           
 void setPolling(int interval, double backoff, int maxInterval)
           
 
Methods inherited from class org.embl.ebi.escience.scufl.Processor
addAlternate, addAnnotationTemplate, addBreakpoint, addPort, defaultAnnotationTemplates, fireModelEvent, getAlternatesArray, getAlternatesList, getAnnotationTemplates, getBackoff, getBoundInputPorts, getBoundOutputPorts, getCritical, getDefaultWorkers, getDescription, getInputPorts, getIterationStrategy, getLogLevel, getModel, getName, getOutputPorts, getPorts, getRealLogLevel, getRetries, getRetryDelay, getTimeout, getWorkers, hasBreakpoint, isBoring, isOffline, locatePort, locatePort, removeAlternate, removeAnnotationTemplate, removePort, rmvBreakpoint, setBackoff, setBoring, setCritical, setDescription, setIterationStrategy, setLogLevel, setName, setOffline, setOnline, setRetries, setRetryDelay, setTimeout, setWorkers, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SoaplabProcessor

public SoaplabProcessor(ScuflModel model,
                        java.lang.String name,
                        java.lang.String endpoint)
                 throws ProcessorCreationException,
                        DuplicateProcessorNameException
Construct a new processor with the given model and name, delegates to the superclass.

Throws:
ProcessorCreationException
DuplicateProcessorNameException
Method Detail

setPolling

public void setPolling(int interval,
                       double backoff,
                       int maxInterval)

isPollingDefined

public boolean isPollingDefined()

getPollingInterval

public int getPollingInterval()

getPollingBackoff

public double getPollingBackoff()

getPollingIntervalMax

public int getPollingIntervalMax()

getMaximumWorkers

public int getMaximumWorkers()
Description copied from class: Processor
Return the maximum number of task implementations that should be launched for this processor. This is ignored unless the processor is being iterated over in which case a number of threads up to the value specified are created to process the information. You must be particularly careful that the task implementation is thread safe before changing this from the default specified here, at the current time the web service processor is not thread safe!

Specified by:
getMaximumWorkers in interface IProcessor
Overrides:
getMaximumWorkers in class Processor

getResourceHost

public java.lang.String getResourceHost()
Description copied from class: Processor
If meaningful, obtain the host that the resource is based in. Of course, not all processor implementations are service based so this may return the string Processor.ENACTOR instead to represent this, and this is the default.

Specified by:
getResourceHost in interface IProcessor
Overrides:
getResourceHost in class Processor

getCategory

public java.lang.String getCategory()

getServicePath

public java.lang.String getServicePath()

getAppName

public java.lang.String getAppName()

getProperties

public java.util.Properties getProperties()
Get the properties for this processor for display purposes

Specified by:
getProperties in interface IProcessor
Specified by:
getProperties in class Processor
Returns:
a Properties instance containing all processor-specific properties, or optinally null if there are none

getDescriptionText

public void getDescriptionText()
                        throws ProcessorCreationException
Use the endpoint data to set the description field

Throws:
ProcessorCreationException

generatePorts

public void generatePorts()
                   throws ProcessorCreationException,
                          PortCreationException,
                          DuplicatePortNameException
Use the endpoint data to create new ports and attach them to the processor. Interogates Soaplab for names of input and output parameters, and additionally for their syntactic types, as we might as well keep that information while we have it.

Throws:
ProcessorCreationException
PortCreationException
DuplicatePortNameException

getEndpoint

public java.net.URL getEndpoint()
Get the URL for this endpoint


getHTMLSummary

public java.lang.String getHTMLSummary(java.util.List<HTMLSummarisableProcessor> processors,
                                       java.util.Map<java.lang.String,Processor> names)
Description copied from interface: HTMLSummarisableProcessor
Generates the html tables for a list of processors, creating a table grouped by resource host.

Specified by:
getHTMLSummary in interface HTMLSummarisableProcessor
Returns:

htmlTablePlacement

public int htmlTablePlacement()
Description copied from interface: HTMLSummarisableProcessor
int indicating the placement for this type of processor in the order of tables displayed

Specified by:
htmlTablePlacement in interface HTMLSummarisableProcessor
Returns: