|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infoservice.InfoServiceCommands
public final class InfoServiceCommands
This is the implementation of all commands the InfoService supports.
Nested Class Summary | |
---|---|
private class |
InfoServiceCommands.HTTPResponseGetter
|
Constructor Summary | |
---|---|
InfoServiceCommands()
|
Method Summary | |
---|---|
private HttpResponseStructure |
addJapForwarder(byte[] a_postData,
java.net.InetAddress a_sourceAddress)
Adds a new JAP forwarder to the database of JAP forwarders. |
private HttpResponseStructure |
cascadePostHelo(byte[] a_postData,
int a_encoding)
This method is called, when we receive data from a mixcascade (first mix) or when we receive data from a remote infoservice, which posts data about a mixcascade. |
private HttpResponseStructure |
cascadePostStatus(byte[] a_postData)
This method is called, when we receive data from a mixcascade about the status or when we receive data from a remote infoservice, which posts data about mixcascade status. |
private HttpResponseStructure |
echoIP(java.net.InetAddress a_sourceAddress)
|
private HttpResponseStructure |
fetchAllMixes()
Sends the complete list of all known mixes to the client. |
private HttpResponseStructure |
fetchAvailableMixes()
Constructs an XML structure containing a list of all free mixes we know. |
private HttpResponseStructure |
getCascadeInfo(int a_supportedEncodings,
java.lang.String a_cascadeId)
Sends the XML encoded mixcascade entry the ID given by cascadeId to the client. |
private HttpResponseStructure |
getInfoServiceInfo(java.lang.String a_infoserviceId)
|
private HttpResponseStructure |
getJapForwarder()
Gets a forwarder entry (encoded with a captcha) from the JAP forwarder database. |
private HttpResponseStructure |
getJnlpFile(java.lang.String a_fileName,
int a_httpMethod)
Sends the JNLP files for the JAP development or release version to the JAP client or any other system which makes a Java WebStart request. |
private HttpResponseStructure |
getMixminionNodesList()
Sends the complete list of all known mixminion nodes to the client. |
private HttpResponseStructure |
getProxyAddresses()
This function sends the addresses of the proxy servers at the end of the cascades as plain text to the client. |
private HttpResponseStructure |
getTorNodesList(int a_supportedEncodings)
Sends the complete list of all known tor nodes to the client. |
private HttpResponseStructure |
humanGetStatus()
Sends a generated HTML file with all status entrys to the client. |
private HttpResponseStructure |
infoServerPostHelo(byte[] a_postData)
This method is called, when we receive data directly from a infoservice or when we receive data from a remote infoservice, which posts data about another infoservice. |
private HttpResponseStructure |
japFetchPaymentInstanceInfo(java.lang.String a_piID)
Sends info about a special payment instance to the client. |
private HttpResponseStructure |
japFetchPaymentInstances()
Sends the complete list of all known payment instances to the client. |
private HttpResponseStructure |
japGetCascadeStatus(java.lang.String a_cascadeId)
Sends the XML encoded status of the mixcascade with the ID given by cascadeId. |
private HttpResponseStructure |
japGetCurrentJapVersion()
Sends the version number of the current minimum required JAP client software as an XML structure. |
private HttpResponseStructure |
japGetMix(java.lang.String a_mixId)
Sends the XML encoded mix entry for the specified ID to the client. |
private HttpResponseStructure |
japPostCurrentJapVersion(byte[] a_postData)
This method is called, when we receive data from another infoservice with the minimum required JAP client version. |
private HttpResponseStructure |
messagePost(byte[] a_postData,
int a_encoding)
|
private HttpResponseStructure |
mixPostConfigure(byte[] a_postData)
This method is called, when we receive data from a mix which wants to get configured automatically (inserted in a auto-configure-cascade). |
private HttpResponseStructure |
mixPostHelo(byte[] a_postData)
This method is called, when we receive data from a non-free mix or when we receive data from a remote infoservice, which posts data about a non-free mix. |
private HttpResponseStructure |
paymentInstancePostHelo(byte[] a_postData)
This method is called, when we receive data from a payment instance or when we receive data from a remote infoservice, which posts data about another payment instance. |
private HttpResponseStructure |
postJnlpFile(java.lang.String a_fileName,
byte[] a_postData)
This method is called, when we receive data from another infoservice with the current japRelease.jnlp or japDevelopment.jnlp Java WebStart files. |
private HttpResponseStructure |
postLatestJavaVersions(byte[] a_postData)
This method is called, when we receive data from another infoservice with the lastest java version for a specific vendor. |
HttpResponseStructure |
processCommand(int method,
int a_supportedEncodings,
java.lang.String command,
byte[] postData,
java.net.InetAddress a_sourceAddress)
This is the handler for processing the InfoService commands. |
private HttpResponseStructure |
renewJapForwarder(byte[] a_postData)
Renews the entry of a JAP forwarder in the database of JAP forwarders. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final InfoServiceCommands.HTTPResponseGetter m_isResponseGetter
private final InfoServiceCommands.HTTPResponseGetter m_cascadeResponseGetter
private final InfoServiceCommands.HTTPResponseGetter m_messageResponseGetter
private final InfoServiceCommands.HTTPResponseGetter m_javaVersionResponseGetter
private IInfoServiceAgreementAdapter m_agreementAdapter
private DynamicCommandsExtension m_dynamicExtension
private Database m_statusinfoDB
Constructor Detail |
---|
public InfoServiceCommands()
Method Detail |
---|
private HttpResponseStructure infoServerPostHelo(byte[] a_postData)
a_postData
- The data we have received.
private HttpResponseStructure paymentInstancePostHelo(byte[] a_postData)
a_postData
- The data we have received.
private HttpResponseStructure japFetchPaymentInstanceInfo(java.lang.String a_piID)
private HttpResponseStructure japFetchPaymentInstances()
private HttpResponseStructure cascadePostHelo(byte[] a_postData, int a_encoding)
a_postData
- The data we have received.a_encoding
- the encoding chosen by the client
private HttpResponseStructure messagePost(byte[] a_postData, int a_encoding)
private HttpResponseStructure mixPostHelo(byte[] a_postData)
a_postData
- The data we have received.
private HttpResponseStructure mixPostConfigure(byte[] a_postData)
a_postData
- The data we have received.
private HttpResponseStructure japGetMix(java.lang.String a_mixId)
a_mixId
- The ID of the requested mix.
private HttpResponseStructure cascadePostStatus(byte[] a_postData)
a_postData
- The data we have received.
private HttpResponseStructure japGetCascadeStatus(java.lang.String a_cascadeId)
a_cascadeId
- The ID of the mixcascade.
private HttpResponseStructure postLatestJavaVersions(byte[] a_postData)
a_postData
- The data we have received.
private HttpResponseStructure humanGetStatus()
private HttpResponseStructure fetchAllMixes()
private HttpResponseStructure fetchAvailableMixes()
private HttpResponseStructure getCascadeInfo(int a_supportedEncodings, java.lang.String a_cascadeId)
a_cascadeId
- The ID of the requested mixcascade.a_supportedEncodings
- defines the encoding supported by the client (deflate, gzip,...)
private HttpResponseStructure getInfoServiceInfo(java.lang.String a_infoserviceId)
private HttpResponseStructure echoIP(java.net.InetAddress a_sourceAddress)
private HttpResponseStructure getTorNodesList(int a_supportedEncodings)
a_supportedEncodings
- defines the encoding supported by the client (deflate, gzip,...)
private HttpResponseStructure getMixminionNodesList()
private HttpResponseStructure addJapForwarder(byte[] a_postData, java.net.InetAddress a_sourceAddress)
a_postData
- The data we have received.a_sourceAddress
- The internet address where the request was coming from. We use this
for checking the connection to the forwarder.
private HttpResponseStructure renewJapForwarder(byte[] a_postData)
a_postData
- The data we have received.
private HttpResponseStructure getJapForwarder()
private HttpResponseStructure japPostCurrentJapVersion(byte[] a_postData)
a_postData
- The data we have received.
private HttpResponseStructure japGetCurrentJapVersion()
private HttpResponseStructure postJnlpFile(java.lang.String a_fileName, byte[] a_postData)
a_fileName
- The filename of the JNLP file (full path starting with / + filename).a_postData
- The data we have received.
private HttpResponseStructure getJnlpFile(java.lang.String a_fileName, int a_httpMethod)
a_fileName
- The filename of the requested JNLP file (full path starting with / +
filename).a_httpMethod
- Describes the HTTP method (can be GET or HEAD, see constants in
Constants.java). Java WebStart requests firstly only the header without
the content and the asks a second time for the whole thing (header +
content).
private HttpResponseStructure getProxyAddresses()
public HttpResponseStructure processCommand(int method, int a_supportedEncodings, java.lang.String command, byte[] postData, java.net.InetAddress a_sourceAddress)
processCommand
in interface JWSInternalCommands
method
- The HTTP method used within the request from the client. See the REQUEST_METHOD
constants in anon.infoservice.Constants.a_supportedEncodings
- The HTTP encodings supported by the client. See the HTTP_ENCODING
constants in HttpResonseStructure.command
- The URL requested from the client within the HTTP request. Normally this
should be an absolute path with a filename.postData
- The HTTP content data (maybe of size 0), if the request was an HTTP POST. If
the HTTP method was not POST, this value is always null.a_sourceAddress
- The internet address from where we have received the request. It is
the address of the other end of the socket connection, so maybe it is
only the address of a proxy.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |