forward.server
Class ForwardCascadeDatabase

java.lang.Object
  extended by forward.server.ForwardCascadeDatabase

public class ForwardCascadeDatabase
extends java.lang.Object

This class stores all MixCascades, where messages from blockees can be forwarded to.


Field Summary
private  java.util.Hashtable m_allowedCascades
          Stores all allowed MixCascades, where messages can be forwarded to.
 
Constructor Summary
ForwardCascadeDatabase()
          This creates a new instance of a ForwardCascadeDatabase.
 
Method Summary
 void addCascade(MixCascade a_cascade)
          Adds a mixcascade to the list of allowed mixcascades for forwarding.
 java.util.Vector getEntryList()
          Returns a snapshot of all values in the database of allowed cascades.
 MixCascade getMixCascadeById(java.lang.String a_id)
          Returns the MixCascade with the specified id, if it is in the database.
 void removeAllCascades()
          Removes all mixcascades from the database of allowed cascades.
 void removeCascade(java.lang.String a_id)
          Removes the mixcascade with the given id from the list of allowed cascades.
 org.w3c.dom.Element toXmlNode(org.w3c.dom.Document doc)
          Returns an XML representation of this database (AllowedCascades node).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_allowedCascades

private java.util.Hashtable m_allowedCascades
Stores all allowed MixCascades, where messages can be forwarded to.

Constructor Detail

ForwardCascadeDatabase

public ForwardCascadeDatabase()
This creates a new instance of a ForwardCascadeDatabase.

Method Detail

getMixCascadeById

public MixCascade getMixCascadeById(java.lang.String a_id)
Returns the MixCascade with the specified id, if it is in the database. If the database doesn't contain a MixCascade with that id, null is returned.

Parameters:
a_id - The id of the demanded MixCascade.
Returns:
The MixCascade with the given id or null, if there is no MixCascade with that id in the database.

toXmlNode

public org.w3c.dom.Element toXmlNode(org.w3c.dom.Document doc)
Returns an XML representation of this database (AllowedCascades node). This node contains a list of MixCascade nodes.

Parameters:
doc - The XML document, which is the environment for the created XML node.
Returns:
The AllowedCascades XML node.

getEntryList

public java.util.Vector getEntryList()
Returns a snapshot of all values in the database of allowed cascades.

Returns:
A Vector with all values which are stored in the allowed cascades database.

addCascade

public void addCascade(MixCascade a_cascade)
Adds a mixcascade to the list of allowed mixcascades for forwarding. If there is already a mixcascade with the same ID in the database, the old entry is replaced by this new one.

Parameters:
a_cascade - The mixcascade to add.

removeCascade

public void removeCascade(java.lang.String a_id)
Removes the mixcascade with the given id from the list of allowed cascades.

Parameters:
a_id - The id of the mixcascade to remove.

removeAllCascades

public void removeAllCascades()
Removes all mixcascades from the database of allowed cascades. So access to the cascades is forbidden for all new client connections.