org.ssonet.net
Interface AnonymityListener


public interface AnonymityListener

By implementing the AnonymityListener interface, an application can keep track of the anonymity level and state of open connections. In BaseConfiguration, users can define an anonymity level, below which they want to get a warning, and an anonymity level below which a connection should be aborted.

Author:
Sebastian Clauß

Field Summary
static int ANONYMITY_STATE_ABORT
          Indicates that connection is aborted because of low anonymity
static int ANONYMITY_STATE_NORMAL
          Indicates a normal (high enough) anonymity state
static int ANONYMITY_STATE_WARN
          Indicates a warning anonymity state
 
Method Summary
 void anonymityLevelChanged(org.ssonet.net.SSONETContext context, int level)
          This method is called, if the anonymity level of the connection has changed.
 void anonymityStateChanged(org.ssonet.net.SSONETContext context, int state)
          This method is called, if the anonymity state of the connection has changed.
 

Field Detail

ANONYMITY_STATE_NORMAL

public static final int ANONYMITY_STATE_NORMAL
Indicates a normal (high enough) anonymity state

See Also:
Constant Field Values

ANONYMITY_STATE_WARN

public static final int ANONYMITY_STATE_WARN
Indicates a warning anonymity state

See Also:
Constant Field Values

ANONYMITY_STATE_ABORT

public static final int ANONYMITY_STATE_ABORT
Indicates that connection is aborted because of low anonymity

See Also:
Constant Field Values
Method Detail

anonymityLevelChanged

public void anonymityLevelChanged(org.ssonet.net.SSONETContext context,
                                  int level)
This method is called, if the anonymity level of the connection has changed. The anonymity level is defined as an integer >= 0. It indicates the size of the anonymity group.

Parameters:
context - the SSONETContext for the connection, where the anonymity level has changed
level - the anonymity level reached

anonymityStateChanged

public void anonymityStateChanged(org.ssonet.net.SSONETContext context,
                                  int state)
This method is called, if the anonymity state of the connection has changed. There are three states:

ANONYMITY_STATE_NORMAL, ANONYMITY_STATE_WARN and ANONYMITY_STATE_ABORT.

Parameters:
context - the SSONETContext for the connection, where the anonymity state has changed
state - the anonymity state reached


Copyright © 2003 DRIM Team. All Rights Reserved.