public class AnonClient extends java.lang.Object implements AnonService, java.util.Observer, DataChainErrorListener, IntegrityErrorListener
AnonService using mix cascades to ensure
anonymous communication.| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_BLOCK_TIMEOUT |
static int |
DEFAULT_LOGIN_TIMEOUT |
ANONLIB_VERSION| Constructor and Description |
|---|
AnonClient() |
AnonClient(DirectProxy a_directProxy) |
AnonClient(DirectProxy a_directProxy,
anon.transport.connection.IStreamConnection a_theConnection,
MixCascade a_currentService) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(AnonServiceEventListener a_eventListener)
Adds an AnonServiceEventListener.
|
AnonChannel |
createChannel(int a_type)
Creates a new AnonChannel, which could be used for transmitting data.
|
void |
dataChainErrorSignaled(AnonServiceException a_e) |
SocketHandler |
getConnectionToMixCascade()
Return the TCP connection used to connect to the cascade.
|
MixCascade |
getCurrentService() |
static int |
getLoginTimeout() |
void |
initialize(AnonServerDescription a_mixCascade,
IServiceContainer a_serviceContainer,
TermsAndConditionConfirmation termsConfirmation,
boolean a_bIsReconnect)
Initializes the underlying AnonService, using a subclass of
AnonServerDescription to give
specific details. |
void |
integrityErrorSignaled(int a_iErrorCode) |
static boolean |
isBlockedOnHttpConnectionError() |
boolean |
isConnected()
Returns true if this Anon Service is connected, e.g. initialized and usable
|
boolean |
isSendingControlMessage() |
static boolean |
isTestInstance() |
void |
removeEventListener(AnonServiceEventListener a_eventListener)
Removes an AnonServiceEventListener.
|
void |
removeEventListeners() |
static void |
setBlockOnHttpConnectionError(boolean a_bBlock) |
void |
setDebug(boolean bDebug)
if bDebug==true this client operates in debug modes.
|
void |
setDNSResolver(HTTPClient.IHTTPClientDNSResolver a_dnsResolver) |
void |
setDummyTraffic(int a_interval)
Set the interval after which a dummy is sent
|
void |
setInterfaceBlockTimout(long msTimeOut)
Sets the time [in ms] an interface of a Cascade is block, if a connection
error occurs)
|
static void |
setLoginTimeout(int a_loginTimeoutMS) |
int |
setProxy(IMutableProxyInterface a_proxyInterface)
Sets the settings for the proxy, which should be used to establish network connections
|
void |
setSocketFactory(HTTPClient.HTTPClientSocketFactory socketFactory)
Sets the socket factory to be used in creating sockets to connect to the AnonService.
|
static void |
setTestInstance(boolean a_bTestInstance) |
void |
shutdown(boolean a_bResetTransferredBytes)
Disconnects form the server.
|
static void |
tearDown()
Only for internal cleanup!
|
void |
update(java.util.Observable a_object,
java.lang.Object a_argument) |
public static final int DEFAULT_LOGIN_TIMEOUT
public static final long DEFAULT_BLOCK_TIMEOUT
public AnonClient()
public AnonClient(DirectProxy a_directProxy)
public AnonClient(DirectProxy a_directProxy, anon.transport.connection.IStreamConnection a_theConnection, MixCascade a_currentService)
public void setDebug(boolean bDebug)
public static void setTestInstance(boolean a_bTestInstance)
public static boolean isTestInstance()
public MixCascade getCurrentService()
public void initialize(AnonServerDescription a_mixCascade, IServiceContainer a_serviceContainer, TermsAndConditionConfirmation termsConfirmation, boolean a_bIsReconnect) throws AnonServiceException
AnonServiceAnonServerDescription to give
specific details.
This method must be called before any Channels can be created.initialize in interface AnonServicea_mixCascade - Parameters describing the service configuration.AnonServiceExceptionpublic static void setLoginTimeout(int a_loginTimeoutMS)
public static void setBlockOnHttpConnectionError(boolean a_bBlock)
public static boolean isBlockedOnHttpConnectionError()
public static int getLoginTimeout()
public int setProxy(IMutableProxyInterface a_proxyInterface)
AnonServicesetProxy in interface AnonServicepublic void shutdown(boolean a_bResetTransferredBytes)
AnonServiceshutdown in interface AnonServicepublic boolean isConnected()
AnonServiceisConnected in interface AnonServicepublic boolean isSendingControlMessage()
public AnonChannel createChannel(int a_type) throws java.net.ConnectException
AnonServicecreateChannel in interface AnonServicea_type - the type of the created channel; See AnonChannelAnonChannel, useful for data transmissionjava.net.ConnectExceptionpublic void addEventListener(AnonServiceEventListener a_eventListener)
AnonServiceAnonServiceEventListener.addEventListener in interface AnonServicea_eventListener - Listener to addpublic void removeEventListeners()
removeEventListeners in interface AnonServicepublic void removeEventListener(AnonServiceEventListener a_eventListener)
AnonServiceremoveEventListener in interface AnonServicea_eventListener - Listener, which will be removedpublic void update(java.util.Observable a_object,
java.lang.Object a_argument)
update in interface java.util.Observerpublic void dataChainErrorSignaled(AnonServiceException a_e)
dataChainErrorSignaled in interface DataChainErrorListenerpublic void integrityErrorSignaled(int a_iErrorCode)
integrityErrorSignaled in interface IntegrityErrorListenerpublic void setDummyTraffic(int a_interval)
a_interval - The new dummy traffic interval in milliseconds or @see DummyTrafficControlChannel.DT_DISABLE,
if dummy traffic shall be disabled.public void setInterfaceBlockTimout(long msTimeOut)
ms - block timeout in mspublic SocketHandler getConnectionToMixCascade()
public void setSocketFactory(HTTPClient.HTTPClientSocketFactory socketFactory)
AnonServicesetSocketFactory in interface AnonServicesocketFactory - socket factory used to create sockets, if NULL the default socket factory of the JRE is used.public void setDNSResolver(HTTPClient.IHTTPClientDNSResolver a_dnsResolver)
public static void tearDown()
Copyright © 2023. All rights reserved.