|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.infoservice.AbstractDatabaseEntry anon.infoservice.AbstractDistributableDatabaseEntry anon.infoservice.AbstractDistributableCertifiedDatabaseEntry anon.infoservice.MixInfo
public class MixInfo
Holds the information of one single mix.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class anon.infoservice.AbstractDistributableDatabaseEntry |
---|
AbstractDistributableDatabaseEntry.SerialDBEntry, AbstractDistributableDatabaseEntry.Serials |
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_NAME
|
static int |
FIRST_MIX
|
static int |
LAST_MIX
|
private boolean |
m_bFromCascade
If this MixInfo has been recevied directly from a cascade connection. |
private boolean |
m_dynamic
LERNGRUPPE Indicates if this mix is available for dynamic cascades |
private boolean |
m_freeMix
Stores whether the mix is waiting for a cascade assignment. |
private long |
m_lastUpdate
Time (see System.currentTimeMillis()) when the mix has sent this HELO message. |
private JAPCertificate |
m_mixCertificate
Stores the certificate for this mix. |
private CertPath |
m_mixCertPath
Stores the certPath for this mix. |
private java.lang.String |
m_mixId
This is the ID of the mix. |
private ServiceLocation |
m_mixLocation
Some information about the location of the mix. |
private ServiceOperator |
m_mixOperator
Some information about the operator of the mix. |
private XMLSignature |
m_mixSignature
Stores the signature element for this mix. |
private ServiceSoftware |
m_mixSoftware
Some information about the used mix software. |
private java.lang.String |
m_name
The name of the mix. |
private long |
m_serial
|
private int |
m_type
LERNGRUPPE This is the type of the mix |
private org.w3c.dom.Element |
m_xmlStructure
Stores the XML structure for this mix. |
static int |
MIDDLE_MIX
|
static java.lang.String |
XML_ELEMENT_CONTAINER_NAME
|
static java.lang.String |
XML_ELEMENT_NAME
|
Fields inherited from class anon.infoservice.AbstractDistributableDatabaseEntry |
---|
XML_ATTR_LAST_UPDATE, XML_ATTR_SERIAL, XML_ATTR_VALID, XML_ATTR_VERIFIED |
Fields inherited from class anon.infoservice.AbstractDatabaseEntry |
---|
XML_LAST_UPDATE |
Fields inherited from interface anon.infoservice.IDistributable |
---|
FIELD_HTTP_REQUEST_STRING, FIELD_HTTP_SERIALS_REQUEST_STRING |
Fields inherited from interface anon.util.IXMLEncodable |
---|
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_VERSION |
Constructor Summary | |
---|---|
MixInfo(org.w3c.dom.Element a_mixNode)
Creates a new MixInfo from XML description (Mix node). |
|
MixInfo(org.w3c.dom.Element a_mixNode,
long a_expireTime)
Creates a new MixInfo from XML description (Mix node). |
|
MixInfo(org.w3c.dom.Element a_mixNode,
long a_expireTime,
boolean a_bFromCascade)
Creates a new MixInfo from XML description (Mix node). |
|
MixInfo(java.lang.String a_mixID,
CertPath a_certPath)
|
Method Summary | |
---|---|
JAPCertificate |
getCertificate()
Returns the certificate of the mix For MixInfo-Objects in the InfoService the certificate is null |
CertPath |
getCertPath()
Returns the CertPath of the mix For MixInfo-Objects in the InfoService the CertPath is null |
java.lang.String |
getFirstHostName()
LERNGRUPPE Extracts the host name from first listenerinterface. |
int |
getFirstPort()
LERNGRUPPE Extracts the port from first listenerinterface. |
java.lang.String |
getId()
Returns the ID of the mix. |
long |
getLastUpdate()
Returns the time (see System.currentTimeMillis()), when the mix has sent this MixInfo to an infoservice. |
java.lang.String |
getName()
Returns the name of the mix. |
java.lang.String |
getPostFile()
This returns the filename (InfoService command), where this mix entry is posted at other InfoServices. |
ServiceLocation |
getServiceLocation()
Returns the location of the mix. |
ServiceOperator |
getServiceOperator()
Returns information about the operator of this mix. |
ServiceSoftware |
getServiceSoftware()
Returns information about the used software in this mix. |
int |
getType()
LERNGRUPPE Returns the type of this mix |
java.lang.String |
getTypeAsString()
LERNGRUPPE Returns the type of this mix |
long |
getVersionNumber()
Returns the time when this mix entry was created by the origin mix. |
org.w3c.dom.Element |
getXmlStructure()
Returns the XML structure for this mix entry. |
boolean |
isDynamic()
LERNGRUPPE Returns true if this mix is available for dynamic cascades,
false otherwise. |
boolean |
isFreeMix()
Returns whether the mix is waiting for a cascade assignment. |
boolean |
isFromCascade()
Returns if this MixInfo has been recevied directly from a cascade connection. |
boolean |
isValid()
Returns if the object is valid at this time |
boolean |
isVerified()
Returns if this entry has been verified with a certificate chain. |
private int |
parseMixType(java.lang.String nodeValue)
LERNGRUPPE Parse the given textual MixType to our constants |
void |
setFreeMix(boolean a_freeMix)
Changes the state of this mix (whether it is free or not). |
Methods inherited from class anon.infoservice.AbstractDistributableCertifiedDatabaseEntry |
---|
checkId |
Methods inherited from class anon.infoservice.AbstractDistributableDatabaseEntry |
---|
getHttpRequestString, getHttpSerialsRequestString, getPostData, getPostEncoding, toXmlElement |
Methods inherited from class anon.infoservice.AbstractDatabaseEntry |
---|
getCreationTime, getExpireTime, isNewerThan, isUserDefined, resetCreationTime |
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 DEFAULT_NAME
public static final java.lang.String XML_ELEMENT_CONTAINER_NAME
public static final java.lang.String XML_ELEMENT_NAME
public static final int FIRST_MIX
public static final int MIDDLE_MIX
public static final int LAST_MIX
private int m_type
private boolean m_dynamic
private java.lang.String m_mixId
private long m_lastUpdate
private long m_serial
private java.lang.String m_name
private ServiceLocation m_mixLocation
private ServiceOperator m_mixOperator
private ServiceSoftware m_mixSoftware
private boolean m_freeMix
private org.w3c.dom.Element m_xmlStructure
private JAPCertificate m_mixCertificate
private CertPath m_mixCertPath
private XMLSignature m_mixSignature
private boolean m_bFromCascade
Constructor Detail |
---|
public MixInfo(org.w3c.dom.Element a_mixNode) throws XMLParseException
a_mixNode
- The Mix node from an XML document.
XMLParseException
public MixInfo(org.w3c.dom.Element a_mixNode, long a_expireTime) throws XMLParseException
a_mixNode
- The Mix node from an XML document.a_expireTime
- forces a specific expire time; takes default expire time if <= 0
XMLParseException
public MixInfo(java.lang.String a_mixID, CertPath a_certPath)
public MixInfo(org.w3c.dom.Element a_mixNode, long a_expireTime, boolean a_bFromCascade) throws XMLParseException
a_mixNode
- The Mix node from an XML document.a_expireTime
- forces a specific expire time; takes default expire time if <= 0a_bFromCascade
- if this is a MixInfo node directly received from a cascade (it is stripped)
if true, the last update value is set to 0
XMLParseException
Method Detail |
---|
private int parseMixType(java.lang.String nodeValue) throws XMLParseException
nodeValue
- The textual MixType (FirstMix, MiddleMix, LastMix)
XMLParseException
public java.lang.String getId()
getId
in interface IDistributable
getId
in class AbstractDatabaseEntry
public boolean isFromCascade()
public long getLastUpdate()
getLastUpdate
in class AbstractDatabaseEntry
public long getVersionNumber()
getVersionNumber
in class AbstractDatabaseEntry
public java.lang.String getName()
public boolean isVerified()
AbstractDistributableCertifiedDatabaseEntry
isVerified
in interface IVerifyable
isVerified
in class AbstractDistributableCertifiedDatabaseEntry
public boolean isValid()
IVerifyable
isValid
in interface IVerifyable
public JAPCertificate getCertificate()
getCertificate
in class AbstractDistributableCertifiedDatabaseEntry
public CertPath getCertPath()
getCertPath
in interface IVerifyable
public ServiceLocation getServiceLocation()
public ServiceOperator getServiceOperator()
public ServiceSoftware getServiceSoftware()
public boolean isFreeMix()
public void setFreeMix(boolean a_freeMix)
a_freeMix
- Whether to treat this mix as free (true) or not (false).public java.lang.String getPostFile()
getPostFile
in interface IDistributable
public org.w3c.dom.Element getXmlStructure()
getXmlStructure
in class AbstractDistributableDatabaseEntry
public int getType()
public java.lang.String getTypeAsString()
public boolean isDynamic()
true
if this mix is available for dynamic cascades,
false
otherwise.
true
if this mix is available for dynamic cascades,
false
otherwise.public java.lang.String getFirstHostName() throws java.lang.Exception
java.lang.Exception
public int getFirstPort() throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |