edu.ucsb.cs.jicos.services
Class HostTaskStats

java.lang.Object
  extended by edu.ucsb.cs.jicos.services.ServiceTaskStats
      extended by edu.ucsb.cs.jicos.services.HostTaskStats
All Implemented Interfaces:
edu.ucsb.cs.jicos.services.external.XmlConverter, java.io.Serializable

public class HostTaskStats
extends ServiceTaskStats
implements java.io.Serializable, edu.ucsb.cs.jicos.services.external.XmlConverter

Contains task execution statistics for 1 Host that are associated with a single login session.

Author:
Peter Cappello
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface edu.ucsb.cs.jicos.services.external.XmlConverter
NAMESPACE, STYLESHEET_Html, STYLESHEET_Unknown, STYLESHEET_Xml
 
Method Summary
 int $tasksExecuted()
          Returns the number of Task objects executed by this Service.
 java.lang.Object createInput(XmlDocument xmlDocument)
          Create an appropriate input object for this task.
 XmlDocument createResult(java.lang.Object result)
          Create an XML encoding for the result of the computation of this task.
 Shared createShared(XmlDocument xmlDocument)
          Create the appropriate shared object for this task.
 boolean fromXml(XmlDocument xmlDocument)
          Populate a Java class from an XML document.
 TaskClassStats taskClassStats()
          Returns the TaskClassStats object associated with this Service.
 java.lang.String toString(java.lang.String pad)
          Returns a String representation of this object.
 java.lang.String toXml(java.lang.String prefix)
           
 
Methods inherited from class edu.ucsb.cs.jicos.services.ServiceTaskStats
createInput, createShared, fromXml, getStyleSheet, serviceName, serviceTaskStats, toHtmlString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.ucsb.cs.jicos.services.external.XmlConverter
createInput, createShared, fromXml, getStyleSheet, toHtmlString
 

Method Detail

$tasksExecuted

public int $tasksExecuted()
Returns the number of Task objects executed by this Service.

Returns:
the number of Task objects executed by this Service.

taskClassStats

public TaskClassStats taskClassStats()
Returns the TaskClassStats object associated with this Service.

Returns:
the TaskClassStats object associated with this Service.

toString

public java.lang.String toString(java.lang.String pad)
Returns a String representation of this object.

Parameters:
pad - A String that is prepended to the returned String.
Returns:
a String representation of this object, including the Service name information, the number of Task objects executed, [if the Service is a Host, the idle time and the idle time per task], and the TaskClassStats.

toXml

public java.lang.String toXml(java.lang.String prefix)
Specified by:
toXml in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Overrides:
toXml in class ServiceTaskStats

fromXml

public boolean fromXml(XmlDocument xmlDocument)
Populate a Java class from an XML document.

Parameters:
xmlDocument - The XML DOM.
Returns:
Success (true), or failure (false).

createInput

public java.lang.Object createInput(XmlDocument xmlDocument)
Create an appropriate input object for this task.

Parameters:
xmlDocument - The XML DOM.
Returns:
Input object (may be null).

createShared

public Shared createShared(XmlDocument xmlDocument)
Create the appropriate shared object for this task.

Parameters:
xmlDocument - The XML DOM.
Returns:
Sharedc object (may be null).

createResult

public XmlDocument createResult(java.lang.Object result)
Create an XML encoding for the result of the computation of this task.

Specified by:
createResult in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Overrides:
createResult in class ServiceTaskStats
Parameters:
result - The result from a compute.
Returns:
An DOM object, or null on error.


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