de.kosi.rmi
Class IdentityServerSocket

java.lang.Object
  |
  +--java.net.ServerSocket
        |
        +--de.kosi.rmi.IdentityServerSocket

public class IdentityServerSocket
extends java.net.ServerSocket

This is a custom server socket. It can be used to accept connections from an IdentitySocket.

Version:
$Revision: 1.1 $
Author:
Rickard Öberg
See Also:
HelloWorld

Constructor Summary
protected IdentityServerSocket(java.net.ServerSocket wrappedServerSocket)
          Create a new server socket
 
Method Summary
 java.net.Socket accept()
          Listen for incoming connection requests, and create a socket with which to talk to the client.
 void close()
           
 java.net.InetAddress getInetAddress()
           
 int getLocalPort()
           
 int getSoTimeout()
           
 void setSoTimeout(int timeout)
           
 java.lang.String toString()
           
 
Methods inherited from class java.net.ServerSocket
implAccept, setSocketFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdentityServerSocket

protected IdentityServerSocket(java.net.ServerSocket wrappedServerSocket)
                        throws java.io.IOException
Create a new server socket
Parameters:
port - the port which it should listen to
Throws:
java.io.IOException - thrown if creation failed
Method Detail

accept

public java.net.Socket accept()
                       throws java.io.IOException
Listen for incoming connection requests, and create a socket with which to talk to the client.
Overrides:
accept in class java.net.ServerSocket
Returns:
a socket connected to a client
Throws:
java.io.IOException - thrown if connection creation failed

getInetAddress

public java.net.InetAddress getInetAddress()
Overrides:
getInetAddress in class java.net.ServerSocket

getLocalPort

public int getLocalPort()
Overrides:
getLocalPort in class java.net.ServerSocket

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.net.ServerSocket

setSoTimeout

public void setSoTimeout(int timeout)
                  throws java.net.SocketException
Overrides:
setSoTimeout in class java.net.ServerSocket

getSoTimeout

public int getSoTimeout()
                 throws java.io.IOException
Overrides:
getSoTimeout in class java.net.ServerSocket

toString

public java.lang.String toString()
Overrides:
toString in class java.net.ServerSocket