anon
Interface AnonChannel

All Known Implementing Classes:
AbstractChannel, AbstractDataChain, ChannelProxy, MixminionPOPChannel, MixminionSMTPChannel, SequentialChannelDataChain, SingleChannelDataChain, TorChannel, TorSocksChannel, TypeFilterDataChain

public interface AnonChannel

An AnonChannel could be used to send and receive data. There are different types of channels and the transmitted data must match the (proxy-)protocol implied by the type of the channel. A new channel is created via createChannel()

Version:
1.0

Field Summary
static int HTTP
           
static int SMTP
           
static int SOCKS
           
 
Method Summary
 void close()
          Closes the channel and releases all resources used.
 java.io.InputStream getInputStream()
          The returned InputStream could be used to receive data.
 int getOutputBlockSize()
          Returns a value that indicates the current optimum size of data to write..
 java.io.OutputStream getOutputStream()
          The returned OutputStream could be used to send data.
 boolean isClosed()
           
 

Field Detail

HTTP

static final int HTTP
See Also:
Constant Field Values

SOCKS

static final int SOCKS
See Also:
Constant Field Values

SMTP

static final int SMTP
See Also:
Constant Field Values
Method Detail

getInputStream

java.io.InputStream getInputStream()
The returned InputStream could be used to receive data.

Returns:
InputStream, useful for receiving data

getOutputStream

java.io.OutputStream getOutputStream()
The returned OutputStream could be used to send data.

Returns:
OutputStream, useful for sending data

getOutputBlockSize

int getOutputBlockSize()
Returns a value that indicates the current optimum size of data to write.. Because often anon services transport the data splited into packets for optimum performance it may be good to send data according to the packet size to avoid unneccessary overheads.

Returns:
the current optimum size for output data. If 1 is returned the size does not matter.

close

void close()
Closes the channel and releases all resources used.


isClosed

boolean isClosed()