anon.client
Class TypeFilterDataChain

java.lang.Object
  extended by anon.client.TypeFilterDataChain
All Implemented Interfaces:
AnonChannel

public class TypeFilterDataChain
extends java.lang.Object
implements AnonChannel

Author:
Stefan Lieske

Nested Class Summary
private  class TypeFilterDataChain.TypeFilterOutputStreamImplementation
           
 
Field Summary
private  boolean m_firstPacket
           
private  java.lang.Object m_internalSynchronization
           
private  AnonChannel m_originChannel
           
private  java.io.OutputStream m_typeFilterOutputStream
           
 
Fields inherited from interface anon.AnonChannel
HTTP, SMTP, SOCKS
 
Constructor Summary
TypeFilterDataChain(AnonChannel a_originChannel, int a_dataChainType)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_originChannel

private AnonChannel m_originChannel

m_internalSynchronization

private java.lang.Object m_internalSynchronization

m_firstPacket

private boolean m_firstPacket

m_typeFilterOutputStream

private java.io.OutputStream m_typeFilterOutputStream
Constructor Detail

TypeFilterDataChain

public TypeFilterDataChain(AnonChannel a_originChannel,
                           int a_dataChainType)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
Description copied from interface: AnonChannel
The returned InputStream could be used to receive data.

Specified by:
getInputStream in interface AnonChannel
Returns:
InputStream, useful for receiving data

getOutputStream

public java.io.OutputStream getOutputStream()
Description copied from interface: AnonChannel
The returned OutputStream could be used to send data.

Specified by:
getOutputStream in interface AnonChannel
Returns:
OutputStream, useful for sending data

getOutputBlockSize

public int getOutputBlockSize()
Description copied from interface: AnonChannel
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.

Specified by:
getOutputBlockSize in interface AnonChannel
Returns:
the current optimum size for output data. If 1 is returned the size does not matter.

close

public void close()
Description copied from interface: AnonChannel
Closes the channel and releases all resources used.

Specified by:
close in interface AnonChannel