org.biomoby.client.taverna.plugin
Class BiomobyProcessor

java.lang.Object
  extended by org.embl.ebi.escience.scufl.Processor
      extended by org.biomoby.client.taverna.plugin.BiomobyProcessor
All Implemented Interfaces:
java.io.Serializable, IProcessor, HTMLSummarisableProcessor

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

A processor based on the Biomoby compliant web services. This processor implementation will contact Biomoby registry in order to find the list of extant ports at creation time.

Version:
$Id: BiomobyProcessor.java,v 1.5 2008/09/05 14:34:39 edwardkawas Exp $
Author:
Martin Senger
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.embl.ebi.escience.scufl.IProcessor
ENACTOR
 
Constructor Summary
BiomobyProcessor(ScuflModel model, java.lang.String processorName, org.biomoby.shared.MobyService service, java.lang.String mobyEndpoint)
          Construct a new processor with the given model and name, delegates to the superclass.
BiomobyProcessor(ScuflModel model, java.lang.String processorName, java.lang.String authorityName, java.lang.String serviceName, java.lang.String mobyEndpoint)
          Construct a new processor with the given model and name, delegates to the superclass.
 
Method Summary
 boolean containsSecondaries()
           
 void generatePorts()
          Use the endpoint data to create new ports and attach them to the processor.
 java.lang.String getAuthorityName()
          Get the authority of this Moby-compliant service
 org.biomoby.shared.Central getCentralWorker()
           
 void getDescriptionText()
          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.
 java.lang.String getMobyEndpoint()
          Get the moby central endpoint used to locate this processor
 org.biomoby.shared.MobyService getMobyService()
           
 org.biomoby.service.dashboard.data.ParametersTable getParameterTable()
           
 java.util.Properties getProperties()
          Get the properties for this processor for display purposes
 java.lang.String getResourceHost()
          Get the host for this service
 java.lang.String getServiceName()
          Get the name of this Moby-compliant service
 int htmlTablePlacement()
          int indicating the placement for this type of processor in the order of tables displayed
 void setParameterTable(org.biomoby.service.dashboard.data.ParametersTable table)
           
 
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

BiomobyProcessor

public BiomobyProcessor(ScuflModel model,
                        java.lang.String processorName,
                        java.lang.String authorityName,
                        java.lang.String serviceName,
                        java.lang.String mobyEndpoint)
                 throws ProcessorCreationException,
                        DuplicateProcessorNameException
Construct a new processor with the given model and name, delegates to the superclass.

Throws:
ProcessorCreationException
DuplicateProcessorNameException

BiomobyProcessor

public BiomobyProcessor(ScuflModel model,
                        java.lang.String processorName,
                        org.biomoby.shared.MobyService service,
                        java.lang.String mobyEndpoint)
                 throws ProcessorCreationException,
                        DuplicateProcessorNameException
Construct a new processor with the given model and name, delegates to the superclass.

Throws:
ProcessorCreationException
DuplicateProcessorNameException
Method Detail

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()
Get the host for this service

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

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

getMobyEndpoint

public java.lang.String getMobyEndpoint()
Get the moby central endpoint used to locate this processor


getDescriptionText

public void getDescriptionText()
                        throws ProcessorCreationException
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.

Throws:
ProcessorCreationException
PortCreationException
DuplicatePortNameException

getEndpoint

public java.net.URL getEndpoint()
Get the URL for this endpoint. This is the service endpoint NOT the BioMoby registry one!


getServiceName

public java.lang.String getServiceName()
Get the name of this Moby-compliant service


getMobyService

public org.biomoby.shared.MobyService getMobyService()

getAuthorityName

public java.lang.String getAuthorityName()
Get the authority of this Moby-compliant service


getCentralWorker

public org.biomoby.shared.Central getCentralWorker()
Returns:
the instance of org.biomoby.shared.Central

containsSecondaries

public boolean containsSecondaries()

getParameterTable

public org.biomoby.service.dashboard.data.ParametersTable getParameterTable()

setParameterTable

public void setParameterTable(org.biomoby.service.dashboard.data.ParametersTable table)

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: