|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.client.AbstractChannel anon.client.AbstractControlChannel anon.client.StreamedControlChannel anon.client.XmlControlChannel anon.pay.AIControlChannel
public class AIControlChannel
This control channel is used for communication with the AI (AccountingInstance or Abrechnungsinstanz in German) which lives in the first mix. The AI sends a request when it wants a cost confirmation from us. This thread waits for incoming requests and sends the requested confirmations to the AI.
Field Summary | |
---|---|
private static long |
BALANCE_MILLISECONDS
How many milliseconds to wait before requesting a new account statement |
private static double |
DIFFERENCE_THRESHOLD
Threshold for warning the user of too large number of transferred bytes in cc (0-1) |
private static int |
EVENT_UNREAL
|
private java.util.Vector |
m_aiListeners
|
private boolean |
m_bFirstBalance
|
private int |
m_diff
|
private long |
m_lastBalanceUpdate
|
private long |
m_lastDiffBytes
|
private PacketCounter |
m_packetCounter
|
private IMutableProxyInterface |
m_proxys
|
private static long |
m_totalBytes
|
Constructor Summary | |
---|---|
AIControlChannel(Multiplexer a_multiplexer,
IMutableProxyInterface a_proxy,
PacketCounter a_packetCounter,
IServiceContainer a_serviceContainer)
|
Method Summary | |
---|---|
void |
addAIListener(IAIEventListener a_aiListener)
|
private void |
fireAIEvent(int a_eventType,
long a_additionalInfo)
|
static long |
getBytes()
|
private void |
processChallenge(XMLChallenge chal)
processChallenge |
private void |
processErrorMessage(XMLErrorMessage msg)
processErrorMessage |
private void |
processInitialCC(XMLEasyCC a_cc)
|
private void |
processPayRequest(XMLPayRequest request)
processPayRequest |
void |
processXmlMessage(org.w3c.dom.Document docMsg)
proccessXMLMessage - this is called when a new request is coming in. |
boolean |
sendAccountCert()
|
Methods inherited from class anon.client.XmlControlChannel |
---|
processMessage, sendXmlMessage |
Methods inherited from class anon.client.StreamedControlChannel |
---|
processPacketData, sendByteMessage |
Methods inherited from class anon.client.AbstractControlChannel |
---|
getServiceContainer, processReceivedPacket, sendRawMessage |
Methods inherited from class anon.client.AbstractChannel |
---|
createEmptyMixPacket, deleteChannel, multiplexerClosed, sendPacket |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int EVENT_UNREAL
private static final long BALANCE_MILLISECONDS
private static final double DIFFERENCE_THRESHOLD
private boolean m_bFirstBalance
private static long m_totalBytes
private long m_lastBalanceUpdate
private java.util.Vector m_aiListeners
private IMutableProxyInterface m_proxys
private int m_diff
private long m_lastDiffBytes
private PacketCounter m_packetCounter
Constructor Detail |
---|
public AIControlChannel(Multiplexer a_multiplexer, IMutableProxyInterface a_proxy, PacketCounter a_packetCounter, IServiceContainer a_serviceContainer)
Method Detail |
---|
public void addAIListener(IAIEventListener a_aiListener)
public void processXmlMessage(org.w3c.dom.Document docMsg)
processXmlMessage
in class XmlControlChannel
docMsg
- Documentprivate void processChallenge(XMLChallenge chal) throws java.lang.Exception
xMLChallenge
- XMLChallenge
java.lang.Exception
private void processErrorMessage(XMLErrorMessage msg)
msg
- XMLErrorMessageprivate void processPayRequest(XMLPayRequest request)
request
- XMLPayRequestpublic boolean sendAccountCert()
private void fireAIEvent(int a_eventType, long a_additionalInfo)
public static long getBytes()
private void processInitialCC(XMLEasyCC a_cc)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |