org.ssonet.mechanisms.anonymity
Class JAPAnonSocket

java.lang.Object
  |
  +--java.net.Socket
        |
        +--org.ssonet.mechanisms.anonymity.JAPAnonSocket

public class JAPAnonSocket
extends java.net.Socket

Version:
0.1
Author:
Sebastian Clauß

Field Summary
protected  java.net.InetAddress addr
           
protected  int port
           
 
Fields inherited from class java.net.Socket
 
Constructor Summary
JAPAnonSocket(java.net.InetAddress hostAddr, int port, anon.AnonServer anonServer, org.ssonet.mechanisms.anonymity.JAPAnonLevelChecker checker)
          Creates an JAPAnonSocket and connects it through the anonServer to the host with given hostname and portname.
 
Method Summary
 void close()
          Closes this socket.
 java.net.InetAddress getInetAddress()
          Returns the address to which the socket is connected.
 java.io.InputStream getInputStream()
          Returns an input stream for this socket.
 boolean getKeepAlive()
          Not Implemented.
 java.net.InetAddress getLocalAddress()
          Gets the local address to which the socket is bound.
 int getLocalPort()
          Returns the local port to which this socket is bound.
 java.io.OutputStream getOutputStream()
          Returns an output stream for this socket.
 int getPort()
          Returns the remote port to which this socket is connected.
 int getReceiveBufferSize()
          Not Implemented.
 int getSendBufferSize()
          Not Implemented.
 int getSoLinger()
          Not Implemented.
 int getSoTimeout()
          Not Implemented.
 boolean getTcpNoDelay()
          Not Implemented.
 void setKeepAlive(boolean on)
          Not Implemented.
 void setReceiveBufferSize(int size)
          Not Implemented.
 void setSendBufferSize(int size)
          Not Implemented.
 void setSoLinger(boolean on, int linger)
          Not Implemented.
 void setSoTimeout(int timeout)
          Not Implemented.
 void setTcpNoDelay(boolean on)
          Not Implemented.
 void shutdownInput()
          Not Implemented.
 void shutdownOutput()
          Not Implemented.
 java.lang.String toString()
          Converts this socket to a String.
 
Methods inherited from class java.net.Socket
bind, connect, connect, getChannel, getLocalSocketAddress, getOOBInline, getRemoteSocketAddress, getReuseAddress, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setOOBInline, setReuseAddress, setSocketImplFactory, setTrafficClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

addr

protected java.net.InetAddress addr

port

protected int port
Constructor Detail

JAPAnonSocket

public JAPAnonSocket(java.net.InetAddress hostAddr,
                     int port,
                     anon.AnonServer anonServer,
                     org.ssonet.mechanisms.anonymity.JAPAnonLevelChecker checker)
              throws java.io.IOException
Creates an JAPAnonSocket and connects it through the anonServer to the host with given hostname and portname.

Parameters:
hostAddr - the internet address of remote host
port - port at the remote host
anonServer - the AnonServer to use
Throws:
java.io.IOException - if connection fails.
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns an input stream for this socket.

Overrides:
getInputStream in class java.net.Socket
Returns:
a stream for reading from this socket.
Throws:
java.io.IOException - if an I/O error occurs when creating the input stream.

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Returns an output stream for this socket.

Overrides:
getOutputStream in class java.net.Socket
Returns:
an output stream for writing to this socket.
Throws:
java.io.IOException - if an I/O error occurs when creating the output stream.

close

public void close()
           throws java.io.IOException
Closes this socket.

Overrides:
close in class java.net.Socket
Throws:
java.io.IOException - if an I/O error occurs when closing this socket.

getInetAddress

public java.net.InetAddress getInetAddress()
Returns the address to which the socket is connected.

Overrides:
getInetAddress in class java.net.Socket
Returns:
the remote IP address to which this socket is connected.

getLocalAddress

public java.net.InetAddress getLocalAddress()
Gets the local address to which the socket is bound.

Overrides:
getLocalAddress in class java.net.Socket
Returns:
the local address to which the socket is bound.
Since:
JDK1.1

getPort

public int getPort()
Returns the remote port to which this socket is connected.

Overrides:
getPort in class java.net.Socket
Returns:
the remote port number to which this socket is connected.

getLocalPort

public int getLocalPort()
Returns the local port to which this socket is bound.

Overrides:
getLocalPort in class java.net.Socket
Returns:
the local port number to which this socket is connected.

setTcpNoDelay

public void setTcpNoDelay(boolean on)
                   throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
setTcpNoDelay in class java.net.Socket
java.net.SocketException

getTcpNoDelay

public boolean getTcpNoDelay()
                      throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
getTcpNoDelay in class java.net.Socket
java.net.SocketException

setSoLinger

public void setSoLinger(boolean on,
                        int linger)
                 throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
setSoLinger in class java.net.Socket
java.net.SocketException

getSoLinger

public int getSoLinger()
                throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
getSoLinger in class java.net.Socket
java.net.SocketException

setSoTimeout

public void setSoTimeout(int timeout)
                  throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
setSoTimeout in class java.net.Socket
java.net.SocketException

getSoTimeout

public int getSoTimeout()
                 throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
getSoTimeout in class java.net.Socket
java.net.SocketException

setSendBufferSize

public void setSendBufferSize(int size)
                       throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
setSendBufferSize in class java.net.Socket
java.net.SocketException

getSendBufferSize

public int getSendBufferSize()
                      throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
getSendBufferSize in class java.net.Socket
java.net.SocketException

setReceiveBufferSize

public void setReceiveBufferSize(int size)
                          throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
setReceiveBufferSize in class java.net.Socket
java.net.SocketException

getReceiveBufferSize

public int getReceiveBufferSize()
                         throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
getReceiveBufferSize in class java.net.Socket
java.net.SocketException

setKeepAlive

public void setKeepAlive(boolean on)
                  throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
setKeepAlive in class java.net.Socket
java.net.SocketException

getKeepAlive

public boolean getKeepAlive()
                     throws java.net.SocketException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
getKeepAlive in class java.net.Socket
java.net.SocketException

shutdownInput

public void shutdownInput()
                   throws java.io.IOException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
shutdownInput in class java.net.Socket
java.io.IOException

shutdownOutput

public void shutdownOutput()
                    throws java.io.IOException
Not Implemented. Only here for compatibility with java.net.Socket.

Overrides:
shutdownOutput in class java.net.Socket
java.io.IOException

toString

public java.lang.String toString()
Converts this socket to a String.

Overrides:
toString in class java.net.Socket
Returns:
a string representation of this socket.


Copyright © 2003 DRIM Team. All Rights Reserved.