edu.ucsb.cs.jicos.services.external.services
Class TaskExternal

java.lang.Object
  extended by edu.ucsb.cs.jicos.services.Task
      extended by edu.ucsb.cs.jicos.services.external.services.TaskExternal
All Implemented Interfaces:
edu.ucsb.cs.jicos.services.external.XmlConverter, java.io.Serializable
Direct Known Subclasses:
TaskMatlab

public class TaskExternal
extends Task
implements edu.ucsb.cs.jicos.services.external.XmlConverter

Author:
Pete Cappello
See Also:
Serialized Form

Field Summary
protected  java.lang.Class serviceClass
           
 
Fields inherited from class edu.ucsb.cs.jicos.services.Task
ALL_INPUTS
 
Fields inherited from interface edu.ucsb.cs.jicos.services.external.XmlConverter
NAMESPACE, STYLESHEET_Html, STYLESHEET_Unknown, STYLESHEET_Xml
 
Constructor Summary
protected TaskExternal()
           
protected TaskExternal(java.lang.Class serviceClass)
           
 
Method Summary
 java.lang.Object createInput(ExternalData externalData)
           
 XmlDocument createResult(java.lang.Object result)
           
 Shared createShared(ExternalData externalData)
           
 java.lang.Object execute(Environment environment)
          This method implements the computation encapsulated by this task.
 boolean fromXml(ExternalData externalData)
           
 org.w3c.dom.Document getStyleSheet(int styleSheetType)
           
 java.lang.Class serviceClass()
           
 java.lang.String toHtmlString(XmlDocument result, java.lang.String hostPort)
           
 java.lang.String toXml(java.lang.String prefix)
           
 
Methods inherited from class edu.ucsb.cs.jicos.services.Task
compute, execute, executeIncrementally, executeOnServer, getInput, getTaskId, isAtomic, numInputs, numUnsetInputs, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serviceClass

protected java.lang.Class serviceClass
Constructor Detail

TaskExternal

protected TaskExternal()

TaskExternal

protected TaskExternal(java.lang.Class serviceClass)
Method Detail

serviceClass

public java.lang.Class serviceClass()

execute

public java.lang.Object execute(Environment environment)
Description copied from class: Task
This method implements the computation encapsulated by this task. The method is the Task class's reason for being.

Specified by:
execute in class Task
Parameters:
environment - The task's environment: The computation's immutable input & its Shared Object, if any.
Returns:
The returned Object is either the execute method's computed value xor a (compose) Task. In the latter case, the compose task takes the output from this task's subtasks, and composes it to create this task's output. This, at least, is the intent of this method's returned value.

toXml

public java.lang.String toXml(java.lang.String prefix)
                       throws java.lang.Exception
Specified by:
toXml in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Throws:
java.lang.Exception

fromXml

public boolean fromXml(ExternalData externalData)
                throws java.lang.Exception
Specified by:
fromXml in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Throws:
java.lang.Exception

createInput

public java.lang.Object createInput(ExternalData externalData)
                             throws java.lang.Exception
Specified by:
createInput in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Throws:
java.lang.Exception

createShared

public Shared createShared(ExternalData externalData)
                    throws java.lang.Exception
Specified by:
createShared in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Throws:
java.lang.Exception

createResult

public XmlDocument createResult(java.lang.Object result)
                         throws java.lang.Exception
Specified by:
createResult in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Throws:
java.lang.Exception

getStyleSheet

public org.w3c.dom.Document getStyleSheet(int styleSheetType)
Specified by:
getStyleSheet in interface edu.ucsb.cs.jicos.services.external.XmlConverter

toHtmlString

public java.lang.String toHtmlString(XmlDocument result,
                                     java.lang.String hostPort)
Specified by:
toHtmlString in interface edu.ucsb.cs.jicos.services.external.XmlConverter


Jicos: http://cs.ucsb.edu/projects/jicos