org.jboss.net.sockets
Class TimeoutServerSocketFactory

java.lang.Object
  extended byorg.jboss.net.sockets.TimeoutServerSocketFactory
All Implemented Interfaces:
java.rmi.server.RMIServerSocketFactory, java.io.Serializable

public class TimeoutServerSocketFactory
extends java.lang.Object
implements java.rmi.server.RMIServerSocketFactory, java.io.Serializable

A RMIServerSocketFactory that installs a InterruptableInputStream to be responsive to thead interruption events.

See Also:
Serialized Form

Field Summary
protected  int backlog
           
protected  java.net.InetAddress bindAddress
           
 
Constructor Summary
TimeoutServerSocketFactory()
          Create a socket factory that binds on any address with a default backlog of 200
TimeoutServerSocketFactory(java.net.InetAddress bindAddress)
          Create a socket factory with the given bind address
TimeoutServerSocketFactory(java.net.InetAddress bindAddress, int backlog)
          Create a socket factory with the given bind address and backlog
TimeoutServerSocketFactory(int backlog)
          Create a socket factory with the given backlog
 
Method Summary
 java.net.ServerSocket createServerSocket(int port)
          Create a server socket on the specified port (port 0 indicates an anonymous port).
 boolean equals(java.lang.Object obj)
           
 java.lang.String getBindAddress()
           
 int hashCode()
           
 void setBindAddress(java.net.InetAddress bindAddress)
           
 void setBindAddress(java.lang.String host)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bindAddress

protected transient java.net.InetAddress bindAddress

backlog

protected int backlog
Constructor Detail

TimeoutServerSocketFactory

public TimeoutServerSocketFactory()
Create a socket factory that binds on any address with a default backlog of 200


TimeoutServerSocketFactory

public TimeoutServerSocketFactory(java.net.InetAddress bindAddress)
Create a socket factory with the given bind address


TimeoutServerSocketFactory

public TimeoutServerSocketFactory(int backlog)
Create a socket factory with the given backlog


TimeoutServerSocketFactory

public TimeoutServerSocketFactory(java.net.InetAddress bindAddress,
                                  int backlog)
Create a socket factory with the given bind address and backlog

Method Detail

getBindAddress

public java.lang.String getBindAddress()

setBindAddress

public void setBindAddress(java.lang.String host)
                    throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

setBindAddress

public void setBindAddress(java.net.InetAddress bindAddress)

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Create a server socket on the specified port (port 0 indicates an anonymous port).

Specified by:
createServerSocket in interface java.rmi.server.RMIServerSocketFactory
Parameters:
port - the port number
Returns:
the server socket on the specified port
Throws:
java.io.IOException - if an I/O error occurs during server socket creation
Since:
1.2

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()