|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Observable
anon.infoservice.InfoServiceHolder
public class InfoServiceHolder
This class holds the instances of the InfoService class for the JAP client and is a singleton. The instance of this class is observable and will send a notification with an InfoServiceHolderMessage, if the preferred InfoService or the InfoService management policy were changed.
| Field Summary | |
|---|---|
static boolean |
DEFAULT_INFOSERVICE_CHANGES
This defines, whether there is an automatic change of infoservice after failure as default. |
static int |
DEFAULT_OF_ASKED_INFO_SERVICES
|
static int |
MAXIMUM_OF_ASKED_INFO_SERVICES
|
static java.lang.String |
XML_ELEM_CHANGE_INFO_SERVICES
|
static java.lang.String |
XML_ELEMENT_NAME
Stores the name of the root node of the XML settings for this class. |
| Fields inherited from interface anon.util.IXMLEncodable |
|---|
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_VERSION |
| Method Summary | |
|---|---|
void |
getExitAddresses()
|
org.w3c.dom.Element |
getForwarder()
Downloads a forwarder entry from a infoservice. |
java.util.Hashtable |
getInfoServices()
Get a Vector of all infoservices the preferred infoservice knows. |
java.util.Hashtable |
getInfoServiceSerials()
|
java.util.Vector |
getInfoservicesWithForwarderList()
Returns a Vector of InfoServices with all known infoservices (including the preferred infoservice), which have a forwarder list. |
static InfoServiceHolder |
getInstance()
Returns the instance of InfoServiceHolder (Singleton). |
JAPVersionInfo |
getJAPVersionInfo(int japVersionType)
Returns the JAPVersionInfo for the specified type. |
java.util.Hashtable |
getLatestJavaVersions()
Returns all known latests Java versions as JavaVersionDBEntry. |
java.util.Hashtable |
getLatestJavaVersionSerials()
|
java.util.Hashtable |
getMessages()
|
java.util.Hashtable |
getMessageSerials()
|
MixCascade |
getMixCascadeInfo(java.lang.String a_cascadeID)
|
java.util.Hashtable |
getMixCascades()
Get a Vector of all mixcascades the preferred infoservice knows. |
java.util.Hashtable |
getMixCascades(java.lang.String context)
same as getMixCascades but a service context that the cascades must match can be specfied. |
java.util.Hashtable |
getMixCascadeSerials()
|
java.util.Hashtable |
getMixCascadeSerials(java.lang.String context)
same as getMixCascadesSerials but a service context that the serials must match can be specified. |
MixInfo |
getMixInfo(java.lang.String mixId)
Get the MixInfo for the mix with the given ID. |
java.util.Hashtable |
getMixInfos()
|
byte[] |
getMixminionNodesList()
Get the list with the mixminion nodes from the infoservice. |
JAPMinVersion |
getNewVersionNumber()
Get the version String of the current JAP version from the infoservice. |
int |
getNumberOfAskedInfoServices()
|
anon.pay.PaymentInstanceDBEntry |
getPaymentInstance(java.lang.String a_piID)
Get information for a particular payment instance identified by a_piID |
java.util.Hashtable |
getPaymentInstances()
Get a Vector of all payment instances the preferred infoservice knows. |
java.util.Hashtable |
getPerformanceInfos()
|
InfoServiceDBEntry |
getPreferredInfoService()
Returns the preferred InfoService. |
StatusInfo |
getStatusInfo(MixCascade a_cascade)
Get the StatusInfo for the mixcascade with the given ID. |
StatusInfo |
getStatusInfo(MixCascade a_cascade,
long a_timeout)
|
TermsAndConditionsFramework |
getTCFramework(java.lang.String a_id)
from preferred info service |
java.util.Hashtable |
getTermsAndConditions()
|
java.util.Hashtable |
getTermsAndConditionsSerials()
|
byte[] |
getTorNodesList()
Get the list with the tor nodes from the infoservice. |
static java.lang.String |
getXmlSettingsRootNodeName()
Returns the name of the XML node used to store all settings of the InfoServiceHolder instance. |
boolean |
isChangeInfoServices()
Returns, whether there is an automatic change of infoservice after failure. |
void |
loadSettingsFromXml(org.w3c.dom.Element a_infoServiceManagementNode,
boolean a_bForceISChange)
Restores the settings of this instance of InfoServiceHolder with the settings stored in the specified XML node. |
void |
setChangeInfoServices(boolean a_changeInfoServices)
Sets, whether there is an automatic change of infoservice after failure. |
void |
setNumberOfAskedInfoServices(int a_nrAskedInfoServices)
|
void |
setPreferredInfoService(InfoServiceDBEntry a_preferredInfoService)
Sets the preferred InfoService. |
void |
shutdown()
|
org.w3c.dom.Element |
toXmlElement(org.w3c.dom.Document a_doc)
Returns all settings (including the database of known infoservices) as an XML node. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String XML_ELEMENT_NAME
public static final java.lang.String XML_ELEM_CHANGE_INFO_SERVICES
public static final int MAXIMUM_OF_ASKED_INFO_SERVICES
public static final int DEFAULT_OF_ASKED_INFO_SERVICES
public static final boolean DEFAULT_INFOSERVICE_CHANGES
| Method Detail |
|---|
public static InfoServiceHolder getInstance()
public void shutdown()
public static java.lang.String getXmlSettingsRootNodeName()
public void setPreferredInfoService(InfoServiceDBEntry a_preferredInfoService)
a_preferredInfoService - The preferred InfoService.public InfoServiceDBEntry getPreferredInfoService()
public int getNumberOfAskedInfoServices()
public void setNumberOfAskedInfoServices(int a_nrAskedInfoServices)
public void setChangeInfoServices(boolean a_changeInfoServices)
a_changeInfoServices - Whether there are automatic changes of the infoservice.public boolean isChangeInfoServices()
public java.util.Vector getInfoservicesWithForwarderList()
public java.util.Hashtable getMixCascades()
public java.util.Hashtable getMixCascades(java.lang.String context)
context - service context that the returned cascades must match
public java.util.Hashtable getMixCascadeSerials()
public java.util.Hashtable getMixCascadeSerials(java.lang.String context)
context - service context that the returned cascades must match
public TermsAndConditionsFramework getTCFramework(java.lang.String a_id)
public java.util.Hashtable getTermsAndConditions()
public java.util.Hashtable getTermsAndConditionsSerials()
public java.util.Hashtable getPerformanceInfos()
public void getExitAddresses()
public java.util.Hashtable getPaymentInstances()
public anon.pay.PaymentInstanceDBEntry getPaymentInstance(java.lang.String a_piID)
throws java.lang.Exception
java.lang.Exceptionpublic java.util.Hashtable getInfoServices()
public java.util.Hashtable getInfoServiceSerials()
public MixInfo getMixInfo(java.lang.String mixId)
mixId - The ID of the mix to get the MixInfo for.
public java.util.Hashtable getMixInfos()
public StatusInfo getStatusInfo(MixCascade a_cascade)
cascadeId - The ID of the mixcascade to get the StatusInfo for.cascadeLength - The length of the mixcascade (number of mixes). We need this for
calculating the AnonLevel in the StatusInfo.
public StatusInfo getStatusInfo(MixCascade a_cascade,
long a_timeout)
public JAPMinVersion getNewVersionNumber()
public java.util.Hashtable getLatestJavaVersions()
public java.util.Hashtable getLatestJavaVersionSerials()
public java.util.Hashtable getMessages()
public java.util.Hashtable getMessageSerials()
public JAPVersionInfo getJAPVersionInfo(int japVersionType)
japVersionType - Selects the JAPVersionInfo (release / development). Look at the
Constants in JAPVersionInfo.
public byte[] getTorNodesList()
public MixCascade getMixCascadeInfo(java.lang.String a_cascadeID)
public byte[] getMixminionNodesList()
public org.w3c.dom.Element getForwarder()
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
toXmlElement in interface anon.util.IXMLEncodablea_doc - The parent document for the created XML node.
public void loadSettingsFromXml(org.w3c.dom.Element a_infoServiceManagementNode,
boolean a_bForceISChange)
throws java.lang.Exception
a_infoServiceManagementNode - The XML node for loading the settings from. The name of
the needed XML node can be obtained by calling
getXmlSettingsRootNodeName().a_bForceISChange - if automatic change if IS is forced
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||