Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 944
نمايش فراداده

ServerSocketFactoryjavax.net

Java 1.4

This abstract class defines a factory API for creating server socket objects. Use the static getdefault( ) method to obtain a default ServerSocketFactory object that is suitable for creating regular java.net.ServerSocket sockets. Once you have a ServerSocketFactory object, call one of the createServerSocket( ) methods to create a new socket and optionally bind it to a local port and specify the allowed backlog of queued connections. See javax.net.ssl.SSLServerSocketFactory for a socket factory that can create secure javax.net.ssl.SSLServerSocket objects.

public abstract class

ServerSocketFactory { // Protected Constructors protected

ServerSocketFactory ( ); // Public Class Methods public static ServerSocketFactory

getDefault ( ); // Public Instance Methods public java.net.ServerSocket

createServerSocket ( ) throws java.io.IOException; public abstract java.net.ServerSocket

createServerSocket (int

port ) throws java.io.IOException; public abstract java.net.ServerSocket

createServerSocket (int

port , int

backlog ) throws java.io.IOException; public abstract java.net.ServerSocket

createServerSocket (int

port , int

backlog , java.net.InetAddress

ifAddress ) throws java.io.IOException; }

Subclasses

javax.net.ssl.SSLServerSocketFactory

Returned By

javax.net.ssl.SSLServerSocketFactory.getDefault( )