edu.ucsb.cs.jicos.services
Class Invoice

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

public final class Invoice
extends java.lang.Object
implements java.io.Serializable, edu.ucsb.cs.jicos.services.external.XmlConverter

Has information about the computational resources used for a login session, including Task statistics, broken out by Task class. These are grouped by Host within TaskServer.

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
 long beginTime()
          Get the time the login session began.
 java.lang.Object createInput(ExternalData externalData)
          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(ExternalData externalData)
          Create the appropriate shared object for this task.
 long endTime()
          Get the time the login session ended.
 boolean fromXml(ExternalData externalData)
          Populate a Java class from an XML document.
 org.w3c.dom.Document getStyleSheet(int styleSheetType)
           
 ServiceTaskStats hspTaskStats()
          Returns a List of ServiceTaskStat objects, 1 for each TaskServer.
 java.lang.String toHtmlString(XmlDocument result, java.lang.String hostPort)
           
 java.lang.String toString()
          Returns a String representation of the Invoice.
 java.lang.String toXml(java.lang.String prefix)
          Encode a Java class into an XML-encoded string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

beginTime

public long beginTime()
Get the time the login session began.

Returns:
the time the login session began.

endTime

public long endTime()
Get the time the login session ended.

Returns:
Get the time the login session ended.

hspTaskStats

public ServiceTaskStats hspTaskStats()
Returns a List of ServiceTaskStat objects, 1 for each TaskServer.

Returns:
a List of ServiceTaskStat objects, one for each TaskServer.

toString

public java.lang.String toString()
Returns a String representation of the Invoice.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the Invoice.

toXml

public java.lang.String toXml(java.lang.String prefix)
Encode a Java class into an XML-encoded string.

Specified by:
toXml in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Parameters:
prefix - Prepend to each line of output (null --> blank).

fromXml

public boolean fromXml(ExternalData externalData)
Populate a Java class from an XML document.

Specified by:
fromXml in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Parameters:
externalData - The data.
Returns:
Success (true), or failure (false ).

createInput

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

Specified by:
createInput in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Parameters:
externalData - The data.
Returns:
Input object (may be null).

createShared

public Shared createShared(ExternalData externalData)
Create the appropriate shared object for this task.

Specified by:
createShared in interface edu.ucsb.cs.jicos.services.external.XmlConverter
Parameters:
externalData - The data.
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
Parameters:
result - The result from a compute.
Returns:
An DOM object, or null on error.

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