org.embl.ebi.escience.scuflworkers.wsdl
Class WSDLBasedProcessor

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

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

A processor based on an operation defined within a WSDL file accessible to the class at construction time.

Author:
Tom Oinn
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.embl.ebi.escience.scufl.IProcessor
ENACTOR
 
Constructor Summary
WSDLBasedProcessor(ScuflModel model, java.lang.String procName, java.lang.String wsdlLocation, java.lang.String operationName)
           
WSDLBasedProcessor(ScuflModel model, java.lang.String procName, java.lang.String wsdlLocation, java.lang.String operationName, javax.xml.namespace.QName portTypeName)
          Construct a new processor from the given WSDL definition and operation name, delegates to superclass then instantiates ports based on WSDL inspection.
 
Method Summary
 javax.wsdl.Definition getDefinition()
          Provides the javax.wsdl.Definition for WSDL this Processor is associated with.
static javax.wsdl.Definition getDefinition(java.lang.String wsdlLocation)
          Use a static synchronized cache to avoid re-loading and parsing WSDL files where possible within a single Taverna instance
 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 getOperationName()
          Get the operation name for this processor
 net.sf.taverna.wsdl.parser.WSDLParser getParser()
          Provides access to the WSDLParser that represents the WSDL of the service this processor acts upon
 java.util.Properties getProperties()
          Get the properties for this processor for display purposes
 java.lang.String getResourceHost()
          Get the target endpoint for this processor
 java.lang.String getWSDLLocation()
          Get the WSDL location for this processor
 org.apache.wsif.WSIFOperation getWSIFOperation()
          Build a single use WSIFOperation object.
 int htmlTablePlacement()
          int indicating the placement for this type of processor in the order of tables displayed
 java.lang.String toString()
          Return the processor's name in the toString()
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WSDLBasedProcessor

public WSDLBasedProcessor(ScuflModel model,
                          java.lang.String procName,
                          java.lang.String wsdlLocation,
                          java.lang.String operationName)
                   throws ProcessorCreationException,
                          DuplicateProcessorNameException
Throws:
ProcessorCreationException
DuplicateProcessorNameException

WSDLBasedProcessor

public WSDLBasedProcessor(ScuflModel model,
                          java.lang.String procName,
                          java.lang.String wsdlLocation,
                          java.lang.String operationName,
                          javax.xml.namespace.QName portTypeName)
                   throws ProcessorCreationException,
                          DuplicateProcessorNameException
Construct a new processor from the given WSDL definition and operation name, delegates to superclass then instantiates ports based on WSDL inspection.

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

getDefinition

public static javax.wsdl.Definition getDefinition(java.lang.String wsdlLocation)
                                           throws javax.wsdl.WSDLException
Use a static synchronized cache to avoid re-loading and parsing WSDL files where possible within a single Taverna instance

Throws:
javax.wsdl.WSDLException

getDefinition

public javax.wsdl.Definition getDefinition()
                                    throws javax.wsdl.WSDLException
Provides the javax.wsdl.Definition for WSDL this Processor is associated with.

Returns:
Definition
Throws:
javax.wsdl.WSDLException

getWSIFOperation

public org.apache.wsif.WSIFOperation getWSIFOperation()
                                               throws org.apache.wsif.WSIFException
Build a single use WSIFOperation object. This should only be used for a single invocation of the target service!

Throws:
org.apache.wsif.WSIFException

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

getParser

public net.sf.taverna.wsdl.parser.WSDLParser getParser()
Provides access to the WSDLParser that represents the WSDL of the service this processor acts upon

Returns:
WSDLParser

getWSDLLocation

public java.lang.String getWSDLLocation()
Get the WSDL location for this processor


getResourceHost

public java.lang.String getResourceHost()
Get the target endpoint for this processor

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

getOperationName

public java.lang.String getOperationName()
Get the operation name for this processor


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:

toString

public java.lang.String toString()
Description copied from class: Processor
Return the processor's name in the toString()

Overrides:
toString in class Processor