anon.pay.xml
Class XMLMixAccountBalance

java.lang.Object
  extended by anon.pay.xml.XMLMixAccountBalance
All Implemented Interfaces:
IXMLEncodable

public class XMLMixAccountBalance
extends java.lang.Object
implements IXMLEncodable

A simple XML structure storing the current balance of a MixOperator (i.e. how much money does the BI operator owe the MixOperator for the traffic handled by his Mixes?)

Author:
Elmar Schraml

Field Summary
private  int m_balance
           
private  org.w3c.dom.Document m_docTheMixAccountBalance
           
private  java.sql.Timestamp m_lastUpdate
           
static java.lang.String ms_strElemName
           
 
Fields inherited from interface anon.util.IXMLEncodable
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
 
Constructor Summary
XMLMixAccountBalance(byte[] xmldata)
           
XMLMixAccountBalance(org.w3c.dom.Document doc)
           
XMLMixAccountBalance(org.w3c.dom.Element xml)
           
XMLMixAccountBalance(int balance, java.sql.Timestamp lastUpdate)
           
XMLMixAccountBalance(java.lang.String xml)
           
 
Method Summary
 int getBalance()
           
 java.sql.Timestamp getLastUpdate()
           
private  org.w3c.dom.Node internal_toXmlElement(org.w3c.dom.Document a_doc)
          internal_toXmlElement
private  void setValues(org.w3c.dom.Element xml)
          Parses the XML representation and sets the internal values
 boolean sign(IMyPrivateKey key)
           
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
          Return an element that can be appended to the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_balance

private int m_balance

m_lastUpdate

private java.sql.Timestamp m_lastUpdate

m_docTheMixAccountBalance

private org.w3c.dom.Document m_docTheMixAccountBalance

ms_strElemName

public static java.lang.String ms_strElemName
Constructor Detail

XMLMixAccountBalance

public XMLMixAccountBalance(int balance,
                            java.sql.Timestamp lastUpdate)

XMLMixAccountBalance

public XMLMixAccountBalance(java.lang.String xml)
                     throws java.lang.Exception
Throws:
java.lang.Exception

XMLMixAccountBalance

public XMLMixAccountBalance(byte[] xmldata)
                     throws java.lang.Exception
Throws:
java.lang.Exception

XMLMixAccountBalance

public XMLMixAccountBalance(org.w3c.dom.Element xml)
                     throws java.lang.Exception
Throws:
java.lang.Exception

XMLMixAccountBalance

public XMLMixAccountBalance(org.w3c.dom.Document doc)
                     throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

internal_toXmlElement

private org.w3c.dom.Node internal_toXmlElement(org.w3c.dom.Document a_doc)
internal_toXmlElement

Parameters:
m_docTheMixAccountBalance - Document
Returns:
Node

setValues

private void setValues(org.w3c.dom.Element xml)
                throws java.lang.Exception
Parses the XML representation and sets the internal values

Parameters:
xml - Node
Throws:
java.lang.Exception

sign

public boolean sign(IMyPrivateKey key)

getBalance

public int getBalance()

getLastUpdate

public java.sql.Timestamp getLastUpdate()

toXmlElement

public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
Return an element that can be appended to the document.

Specified by:
toXmlElement in interface IXMLEncodable
Parameters:
a_doc - a document
Returns:
the interface as xml element