org.ssonet.mechanisms.anonymity
Class JAPAnonLevelChecker
java.lang.Object
|
+--org.ssonet.mechanisms.anonymity.JAPAnonLevelChecker
- All Implemented Interfaces:
- java.lang.Runnable
- public class JAPAnonLevelChecker
- extends java.lang.Object
- implements java.lang.Runnable
This class implements a thread, which periodically checks the anonymity
level of the choosen AnonServer, and calls the
Constructor Summary |
JAPAnonLevelChecker(SSONETContext context,
anon.infoservice.InfoService infoService,
anon.AnonServer anonServer)
Creates and initializes a JAPAnonLevelChecker. |
Method Summary |
void |
run()
This method periodically checks the anonymity level of the AnonServer and sends warning- or
abort-messages to the AnonymityListeners registered in the context. |
void |
start(java.net.Socket socket)
Starts the JAPAnonLevelChecker. |
void |
stop()
Stops the JAPAnonLevelChecker. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAPAnonLevelChecker
public JAPAnonLevelChecker(SSONETContext context,
anon.infoservice.InfoService infoService,
anon.AnonServer anonServer)
- Creates and initializes a JAPAnonLevelChecker.
- Parameters:
context
- the SSONETContext for the connection, for which the anonLevel is to be checkedinfoService
- the InfoService to ask for the anonLevelthe
- AnonServer, through which the connection goes
run
public void run()
- This method periodically checks the anonymity level of the AnonServer and sends warning- or
abort-messages to the AnonymityListeners registered in the context. On an abort-message the
Socket is closed, i.e. the connection is aborted.
- Specified by:
run
in interface java.lang.Runnable
start
public void start(java.net.Socket socket)
- Starts the JAPAnonLevelChecker.
- Parameters:
socket
- the Socket, which is connected through the AnonServer.
stop
public void stop()
- Stops the JAPAnonLevelChecker.