anon
Interface AnonService

All Known Implementing Classes:
AnonClient, AnonServiceImplProxy, DirectProxy, Mixminion, Tor

public interface AnonService

This class is used for accessing the AnonService. An instance is created via AnonServiceFactory.


Field Summary
static java.lang.String ANONLIB_VERSION
           
 
Method Summary
 void addEventListener(AnonServiceEventListener l)
          Adds an AnonServiceEventListener.
 AnonChannel createChannel(int type)
          Creates a new AnonChannel, which could be used for transmitting data.
 int initialize(AnonServerDescription anonServer, IServiceContainer a_serviceContainer, TermsAndConditionConfirmation termsConfirmation)
          Initializes this AnonService.
 boolean isConnected()
          Returns true if this Anon Service is connected, e.g.
 void removeEventListener(AnonServiceEventListener l)
          Removes an AnonServiceEventListener.
 void removeEventListeners()
           
 int setProxy(IMutableProxyInterface a_Proxy)
          Sets the settings ofr the proxy, which should be used to establish network connections
 void shutdown(boolean a_bResetTransferredBytes)
          Disconnects form the server.
 

Field Detail

ANONLIB_VERSION

static final java.lang.String ANONLIB_VERSION
See Also:
Constant Field Values
Method Detail

initialize

int initialize(AnonServerDescription anonServer,
               IServiceContainer a_serviceContainer,
               TermsAndConditionConfirmation termsConfirmation)
Initializes this AnonService. Depending on the AnonService, this may establish a connection to an AnonServer, which is described through the anonService parameter. This method must be called before any Channels could be created.

Parameters:
anonServer - AnonServer to use
Returns:
E_SUCCESS, if the connection could be established

setProxy

int setProxy(IMutableProxyInterface a_Proxy)
Sets the settings ofr the proxy, which should be used to establish network connections

Returns:
E_SUCCESS, if ok

shutdown

void shutdown(boolean a_bResetTransferredBytes)
Disconnects form the server.


isConnected

boolean isConnected()
Returns true if this Anon Service is connected, e.g. initialized and useable


createChannel

AnonChannel createChannel(int type)
                          throws java.net.ConnectException
Creates a new AnonChannel, which could be used for transmitting data. There is a limit of 50 channels per AnonService-connection, in order to prevent Denial of Service-attacks See AnonChannel for more information.

Parameters:
type - the type of the created channel
Returns:
AnonChannel, usefull for data transmisson
Throws:
ConnectException, - if the Channel could not be created
ToManyOpenChannels, - if there a to many open channels for this AnonService
java.net.ConnectException

addEventListener

void addEventListener(AnonServiceEventListener l)
Adds an AnonServiceEventListener. This listener will receive events like: ... For more information see AnonServiceEventListener.

Parameters:
l - Listener to add

removeEventListener

void removeEventListener(AnonServiceEventListener l)
Removes an AnonServiceEventListener. This Listener will not receive any Events anymore.

Parameters:
l - Listener, which will be removed

removeEventListeners

void removeEventListeners()