public interface AnonService
AnonServiceFactory
for
details regarding the available service types.
An AnonService needs to be initialized with the proper parameters before use
and allows the creation of AnonChannel
objects, which provide In-
and OutputStreams to receive and send data, through it
createChannel(int)
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANONLIB_VERSION |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(AnonServiceEventListener l)
Adds an AnonServiceEventListener.
|
AnonChannel |
createChannel(int type)
Creates a new AnonChannel, which could be used for transmitting data.
|
void |
initialize(AnonServerDescription serviceDesc,
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 |
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.
|
static final java.lang.String ANONLIB_VERSION
void initialize(AnonServerDescription serviceDesc, IServiceContainer a_serviceContainer, TermsAndConditionConfirmation termsConfirmation, boolean a_bIsReconnect) throws AnonServiceException
AnonServerDescription
to give
specific details.
This method must be called before any Channels can be created.serviceDesc
- Parameters describing the service configuration.AnonServiceException
int setProxy(IMutableProxyInterface a_Proxy)
void setSocketFactory(HTTPClient.HTTPClientSocketFactory socketFactory)
socketFactory
- socket factory used to create sockets, if NULL the default socket factory of the JRE is used.void shutdown(boolean a_bResetTransferredBytes)
boolean isConnected()
AnonChannel createChannel(int type) throws java.net.ConnectException
type
- the type of the created channel; See AnonChannel
AnonChannel
, useful for data transmissionConnectException,
- if the Channel could not be createdTooManyOpenChannels,
- if there a too many open channels for this AnonServicejava.net.ConnectException
void addEventListener(AnonServiceEventListener l)
AnonServiceEventListener
.l
- Listener to addvoid removeEventListener(AnonServiceEventListener l)
l
- Listener, which will be removedvoid removeEventListeners()
Copyright © 2023. All rights reserved.