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

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


org.jboss.net.sockets
Class DefaultSocketFactory

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

public class DefaultSocketFactory
extends Object
implements RMIServerSocketFactory, Serializable

An implementation of RMIServerSocketFactory that supports backlog and bind address settings

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

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).
 boolean equals(Object obj)
           
 String getBindAddress()
           
 int hashCode()
           
 void setBindAddress(String host)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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

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

equals

public boolean equals(Object obj)

hashCode

public int hashCode()


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