站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 common API Documentation 英文版文档

DefaultSocketFactory (JBoss/Common API) - JBoss 3.2.7 common API Documentation 英文版文档


org.jboss.net.sockets
Class DefaultSocketFactory

java.lang.Object
  extended byjavax.net.ServerSocketFactory
      extended byorg.jboss.net.sockets.DefaultSocketFactory
All Implemented Interfaces:
RMIServerSocketFactory, Serializable

public class DefaultSocketFactory
extends ServerSocketFactory
implements RMIServerSocketFactory, Serializable

An implementation of RMIServerSocketFactory that supports backlog and bind address settings

Version:
$Revision: 1.1.4.4 $
Author:
Scott.Stark@jboss.org
See Also:
Serialized Form

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

Field Detail

bindAddress

protected transient InetAddress bindAddress

backlog

protected int backlog
Constructor Detail

DefaultSocketFactory

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


DefaultSocketFactory

public DefaultSocketFactory(InetAddress bindAddress)
Create a socket factory with the given bind address


DefaultSocketFactory

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


DefaultSocketFactory

public DefaultSocketFactory(InetAddress bindAddress,
                            int backlog)
Create a socket factory with the given bind address and backlog

Method Detail

getBindAddress

public String getBindAddress()

setBindAddress

public void setBindAddress(String host)
                    throws UnknownHostException
Throws:
UnknownHostException

setBindAddress

public void setBindAddress(InetAddress bindAddress)

createServerSocket

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

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

createServerSocket

public ServerSocket createServerSocket(int port,
                                       int backlog)
                                throws IOException
Parameters:
port - - the port to listen to
backlog - - how many connections are queued
Returns:
A ServerSocket
Throws:
IOException

createServerSocket

public ServerSocket createServerSocket(int port,
                                       int backlog,
                                       InetAddress inetAddress)
                                throws IOException
Parameters:
port - - the port to listen to
backlog - - how many connections are queued
inetAddress - - the network interface address to use
Returns:
Throws:
IOException

equals

public boolean equals(Object obj)

hashCode

public int hashCode()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.