public class Mixminion extends java.lang.Object implements AnonService
Modifier and Type | Field and Description |
---|---|
private IMutableProxyInterface |
m_proxyInterface |
private static MixminionServiceDescription |
m_serviceDescription |
static int |
MAX_ROUTE_LEN |
static int |
MIN_ROUTE_LEN |
private static Mixminion |
ms_theMixminionInstance |
ANONLIB_VERSION
Modifier | Constructor and Description |
---|---|
private |
Mixminion() |
Modifier and Type | Method and Description |
---|---|
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() |
void |
initialize(AnonServerDescription anonServer,
IServiceContainer a_serviceContainer,
TermsAndConditionConfirmation termsConfirmation,
boolean a_bIsReconnect)
Initializes the underlying AnonService, using a subclass of
AnonServerDescription to give
specific details. |
boolean |
isConnected()
Returns true if this Anon Service is connected, e.g. initialized and usable
|
void |
removeEventListener(AnonServiceEventListener l)
Removes an AnonServiceEventListener.
|
void |
removeEventListeners() |
int |
setProxy(IMutableProxyInterface a_Proxy)
Sets the settings for the proxy, which should be used to establish network connections
|
void |
setRouteLen(int len)
sets RouteLength
|
void |
setSocketFactory(HTTPClient.HTTPClientSocketFactory socketFactory)
Sets the socket factory to be used in creating sockets to connect to the AnonService.
|
void |
shutdown(boolean a_bResetTransferredBytes)
Disconnects form the server.
|
private static MixminionServiceDescription m_serviceDescription
public static final int MAX_ROUTE_LEN
public static final int MIN_ROUTE_LEN
private static Mixminion ms_theMixminionInstance
private IMutableProxyInterface m_proxyInterface
public void initialize(AnonServerDescription anonServer, IServiceContainer a_serviceContainer, TermsAndConditionConfirmation termsConfirmation, boolean a_bIsReconnect)
AnonService
AnonServerDescription
to give
specific details.
This method must be called before any Channels can be created.initialize
in interface AnonService
anonServer
- Parameters describing the service configuration.public void setRouteLen(int len)
len
- route lengthpublic static int getRouteLen()
public static java.lang.String getMyEMail()
public int setProxy(IMutableProxyInterface a_Proxy)
AnonService
setProxy
in interface AnonService
public IMutableProxyInterface getProxy()
public void shutdown(boolean a_bResetTransferredBytes)
AnonService
shutdown
in interface AnonService
public boolean isConnected()
AnonService
isConnected
in interface AnonService
public AnonChannel createChannel(int type) throws java.net.ConnectException
createChannel
in interface AnonService
type
- channeltype - only AnonChannel.SMTP is supported at the momentIOException
java.net.ConnectException
public AnonChannel createChannel(java.lang.String host, int port) throws java.net.ConnectException
java.net.ConnectException
public void addEventListener(AnonServiceEventListener l)
AnonService
AnonServiceEventListener
.addEventListener
in interface AnonService
l
- Listener to addpublic void removeEventListener(AnonServiceEventListener l)
AnonService
removeEventListener
in interface AnonService
l
- Listener, which will be removedpublic void removeEventListeners()
removeEventListeners
in interface AnonService
public static Mixminion getInstance()
public void setSocketFactory(HTTPClient.HTTPClientSocketFactory socketFactory)
AnonService
setSocketFactory
in interface AnonService
socketFactory
- socket factory used to create sockets, if NULL the default socket factory of the JRE is used.Copyright © 2023. All rights reserved.