anon.xmlrpc.client
Class ChannelProxy

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

 class ChannelProxy
extends java.lang.Object
implements AnonChannel


Field Summary
private  boolean m_bIsClosed
           
private  boolean m_bIsClosedByPeer
           
protected  int m_id
           
private  ChannelInputStreamProxy m_inputStream
           
private  ChannelOutputStreamProxy m_outputStream
           
protected  AnonServiceImplProxy m_RemoteAnonService
           
protected  int m_type
           
 
Fields inherited from interface anon.AnonChannel
HTTP, SMTP, SOCKS
 
Constructor Summary
ChannelProxy(int id, AnonServiceImplProxy remote)
           
 
Method Summary
 void close()
          Closes the channel and releases all resources used.
 void finalize()
           
 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.
 int hashCode()
           
 boolean isClosed()
           
protected  int recv(byte[] buff, int off, int len)
           
protected  void send(byte[] buff, int off, int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_bIsClosedByPeer

private boolean m_bIsClosedByPeer

m_bIsClosed

private boolean m_bIsClosed

m_id

protected int m_id

m_type

protected int m_type

m_RemoteAnonService

protected AnonServiceImplProxy m_RemoteAnonService

m_inputStream

private ChannelInputStreamProxy m_inputStream

m_outputStream

private ChannelOutputStreamProxy m_outputStream
Constructor Detail

ChannelProxy

public ChannelProxy(int id,
                    AnonServiceImplProxy remote)
             throws java.io.IOException
Throws:
java.io.IOException
Method Detail

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

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

send

protected void send(byte[] buff,
                    int off,
                    int len)
             throws java.io.IOException
Throws:
java.io.IOException

recv

protected int recv(byte[] buff,
                   int off,
                   int len)
            throws java.io.IOException
Throws:
java.io.IOException

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.

isClosed

public boolean isClosed()
Specified by:
isClosed in interface AnonChannel

close

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

Specified by:
close in interface AnonChannel