anon.infoservice
Class MixCascadeExitAddresses

java.lang.Object
  extended by anon.infoservice.AbstractDatabaseEntry
      extended by anon.infoservice.MixCascadeExitAddresses
All Implemented Interfaces:
anon.util.IXMLEncodable

public class MixCascadeExitAddresses
extends AbstractDatabaseEntry
implements anon.util.IXMLEncodable

Stores all exit addresses of one MixCasacde.

Author:
Christian Banse

Field Summary
static int EXIT_ADDRESS_TTL
          The time-to-live of the exit address.
static java.lang.String XML_ATTR_LAST_UPDATE
          The last update XML attribute name.
static java.lang.String XML_ATTR_PAYMENT
          The payment XML attribute name.
static java.lang.String XML_ELEMENT_ADDRESS_NAME
          The exit address XML element name.
static java.lang.String XML_ELEMENT_CONTAINER_NAME
          The entry's container XML element name.
static java.lang.String XML_ELEMENT_NAME
          The XML element name.
 
Fields inherited from class anon.infoservice.AbstractDatabaseEntry
XML_LAST_UPDATE
 
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
MixCascadeExitAddresses(org.w3c.dom.Element a_xmlElement)
           
 
Method Summary
static void addInetAddress(java.lang.String a_cascadeID, java.net.InetAddress a_IPAddress)
           
 java.lang.String getId()
          Returns a unique ID for a database entry.
 long getLastUpdate()
          Returns the time in milliseconds when this db entry was created from the origin instance.
 long getVersionNumber()
          Returns version number which is used to determine the more recent infoservice entry, if two entries are compared (higher version number -> more recent entry).
static boolean isValidAddress(java.net.InetAddress a_address)
           
 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 anon.infoservice.AbstractDatabaseEntry
deletePersistence, getCreationTime, getExpireTime, isNewerThan, isPersistanceDeletionAllowed, isUserDefined, resetCreationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXIT_ADDRESS_TTL

public static final int EXIT_ADDRESS_TTL
The time-to-live of the exit address.

See Also:
Constant Field Values

XML_ELEMENT_CONTAINER_NAME

public static final java.lang.String XML_ELEMENT_CONTAINER_NAME
The entry's container XML element name.

See Also:
Constant Field Values

XML_ELEMENT_NAME

public static final java.lang.String XML_ELEMENT_NAME
The XML element name.

See Also:
Constant Field Values

XML_ELEMENT_ADDRESS_NAME

public static final java.lang.String XML_ELEMENT_ADDRESS_NAME
The exit address XML element name.

See Also:
Constant Field Values

XML_ATTR_LAST_UPDATE

public static final java.lang.String XML_ATTR_LAST_UPDATE
The last update XML attribute name.

See Also:
Constant Field Values

XML_ATTR_PAYMENT

public static final java.lang.String XML_ATTR_PAYMENT
The payment XML attribute name.

See Also:
Constant Field Values
Constructor Detail

MixCascadeExitAddresses

public MixCascadeExitAddresses(org.w3c.dom.Element a_xmlElement)
                        throws anon.util.XMLParseException
Throws:
anon.util.XMLParseException
Method Detail

getId

public java.lang.String getId()
Description copied from class: AbstractDatabaseEntry
Returns a unique ID for a database entry.

Specified by:
getId in class AbstractDatabaseEntry
Returns:
The ID of this database entry.

getLastUpdate

public long getLastUpdate()
Description copied from class: AbstractDatabaseEntry
Returns the time in milliseconds when this db entry was created from the origin instance. Never (!) insert the local creation time here, as this will DoS the InfoServices in an endless loop.

Specified by:
getLastUpdate in class AbstractDatabaseEntry
Returns:
the time in milliseconds when this db entry was created from the origin instance

getVersionNumber

public long getVersionNumber()
Description copied from class: AbstractDatabaseEntry
Returns version number which is used to determine the more recent infoservice entry, if two entries are compared (higher version number -> more recent entry). Never (!) insert the local creation time here, as this will DoS the InfoServices in an endless loop.

Specified by:
getVersionNumber in class AbstractDatabaseEntry
Returns:
The version number for this entry.

addInetAddress

public static void addInetAddress(java.lang.String a_cascadeID,
                                  java.net.InetAddress a_IPAddress)

isValidAddress

public static boolean isValidAddress(java.net.InetAddress a_address)

toXmlElement

public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
Description copied from interface: anon.util.IXMLEncodable
Return an element that can be appended to the document. This Method must not change the document in any way!

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