anon.mixminion
Class Mixminion

java.lang.Object
  extended by anon.mixminion.Mixminion
All Implemented Interfaces:
AnonService

public class Mixminion
extends java.lang.Object
implements AnonService

This class implements the Mixminion anonymity service, which can be used to sent anonymous e-mail


Field Summary
private  IMutableProxyInterface m_proxyInterface
           
private static MixminionServiceDescription m_serviceDescription
           
static int MAX_ROUTE_LEN
           
static int MIN_ROUTE_LEN
           
private static Mixminion ms_theMixminionInstance
           
 
Fields inherited from interface anon.AnonService
ANONLIB_VERSION
 
Constructor Summary
private Mixminion()
           
 
Method Summary
 void addEventListener(AnonServiceEventListener l)
          Adds an AnonServiceEventListener.
 AnonChannel createChannel(int type)
          creates a SMTP channel which sents e-mail through the mixminion-network
 AnonChannel createChannel(java.lang.String host, int port)
          Always returns NULL as normal TCP/IP channels are not supported at the moment
static Mixminion getInstance()
          Returns a Instance of Mixminion
static java.lang.String getMyEMail()
           
 IMutableProxyInterface getProxy()
           
static int getRouteLen()
           
 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 setRouteLen(int len)
          sets RouteLength
 void shutdown(boolean a_bResetTransferredBytes)
          Disconnects form the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_serviceDescription

private static MixminionServiceDescription m_serviceDescription

MAX_ROUTE_LEN

public static final int MAX_ROUTE_LEN
See Also:
Constant Field Values

MIN_ROUTE_LEN

public static final int MIN_ROUTE_LEN
See Also:
Constant Field Values

ms_theMixminionInstance

private static Mixminion ms_theMixminionInstance

m_proxyInterface

private IMutableProxyInterface m_proxyInterface
Constructor Detail

Mixminion

private Mixminion()
Method Detail

initialize

public int initialize(AnonServerDescription anonServer,
                      IServiceContainer a_serviceContainer,
                      TermsAndConditionConfirmation termsConfirmation)
Description copied from interface: AnonService
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.

Specified by:
initialize in interface AnonService
Parameters:
anonServer - AnonServer to use
Returns:
E_SUCCESS, if the connection could be established

setRouteLen

public void setRouteLen(int len)
sets RouteLength

Parameters:
len - route length

getRouteLen

public static int getRouteLen()

getMyEMail

public static java.lang.String getMyEMail()

setProxy

public int setProxy(IMutableProxyInterface a_Proxy)
Description copied from interface: AnonService
Sets the settings ofr the proxy, which should be used to establish network connections

Specified by:
setProxy in interface AnonService
Returns:
E_SUCCESS, if ok

getProxy

public IMutableProxyInterface getProxy()

shutdown

public void shutdown(boolean a_bResetTransferredBytes)
Description copied from interface: AnonService
Disconnects form the server.

Specified by:
shutdown in interface AnonService

isConnected

public boolean isConnected()
Description copied from interface: AnonService
Returns true if this Anon Service is connected, e.g. initialized and useable

Specified by:
isConnected in interface AnonService

createChannel

public AnonChannel createChannel(int type)
                          throws java.net.ConnectException
creates a SMTP channel which sents e-mail through the mixminion-network

Specified by:
createChannel in interface AnonService
Parameters:
type - channeltype - only AnonChannel.SMTP is supported at the moment
Returns:
a channel
Throws:
IOException
java.net.ConnectException

createChannel

public AnonChannel createChannel(java.lang.String host,
                                 int port)
                          throws java.net.ConnectException
Always returns NULL as normal TCP/IP channels are not supported at the moment

Throws:
java.net.ConnectException

addEventListener

public void addEventListener(AnonServiceEventListener l)
Description copied from interface: AnonService
Adds an AnonServiceEventListener. This listener will receive events like: ... For more information see AnonServiceEventListener.

Specified by:
addEventListener in interface AnonService
Parameters:
l - Listener to add

removeEventListener

public void removeEventListener(AnonServiceEventListener l)
Description copied from interface: AnonService
Removes an AnonServiceEventListener. This Listener will not receive any Events anymore.

Specified by:
removeEventListener in interface AnonService
Parameters:
l - Listener, which will be removed

removeEventListeners

public void removeEventListeners()
Specified by:
removeEventListeners in interface AnonService

getInstance

public static Mixminion getInstance()
Returns a Instance of Mixminion

Returns:
a Instance of Mixminion