Package org.apache.catalina.net
Class DefaultServerSocketFactory
- java.lang.Object
-
- org.apache.catalina.net.DefaultServerSocketFactory
-
- All Implemented Interfaces:
ServerSocketFactory
public final class DefaultServerSocketFactory extends Object implements ServerSocketFactory
Default server socket factory, which returns unadorned server sockets.- Author:
- db@eng.sun.com, Harish Prabandham, Craig R. McClanahan
-
-
Constructor Summary
Constructors Constructor Description DefaultServerSocketFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerSocketcreateSocket(int port)Returns a server socket which uses all network interfaces on the host, and is bound to a the specified port.ServerSocketcreateSocket(int port, int backlog)Returns a server socket which uses all network interfaces on the host, is bound to a the specified port, and uses the specified connection backlog.ServerSocketcreateSocket(int port, int backlog, InetAddress ifAddress)Returns a server socket which uses only the specified network interface on the local host, is bound to a the specified port, and uses the specified connection backlog.
-
-
-
Method Detail
-
createSocket
public ServerSocket createSocket(int port) throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException
Returns a server socket which uses all network interfaces on the host, and is bound to a the specified port. The socket is configured with the socket options (such as accept timeout) given to this factory.- Specified by:
createSocketin interfaceServerSocketFactory- Parameters:
port- the port to listen to- Throws:
IOException- input/output or network errorKeyStoreException- error instantiating the KeyStore from file (SSL only)NoSuchAlgorithmException- KeyStore algorithm unsupported by current provider (SSL only)CertificateException- general certificate error (SSL only)UnrecoverableKeyException- internal KeyStore problem with the certificate (SSL only)KeyManagementException- problem in the key management layer (SSL only)
-
createSocket
public ServerSocket createSocket(int port, int backlog) throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException
Returns a server socket which uses all network interfaces on the host, is bound to a the specified port, and uses the specified connection backlog. The socket is configured with the socket options (such as accept timeout) given to this factory.- Specified by:
createSocketin interfaceServerSocketFactory- Parameters:
port- the port to listen tobacklog- how many connections are queued- Throws:
IOException- input/output or network errorKeyStoreException- error instantiating the KeyStore from file (SSL only)NoSuchAlgorithmException- KeyStore algorithm unsupported by current provider (SSL only)CertificateException- general certificate error (SSL only)UnrecoverableKeyException- internal KeyStore problem with the certificate (SSL only)KeyManagementException- problem in the key management layer (SSL only)
-
createSocket
public ServerSocket createSocket(int port, int backlog, InetAddress ifAddress) throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException
Returns a server socket which uses only the specified network interface on the local host, is bound to a the specified port, and uses the specified connection backlog. The socket is configured with the socket options (such as accept timeout) given to this factory.- Specified by:
createSocketin interfaceServerSocketFactory- Parameters:
port- the port to listen tobacklog- how many connections are queuedifAddress- the network interface address to use- Throws:
IOException- input/output or network errorKeyStoreException- error instantiating the KeyStore from file (SSL only)NoSuchAlgorithmException- KeyStore algorithm unsupported by current provider (SSL only)CertificateException- general certificate error (SSL only)UnrecoverableKeyException- internal KeyStore problem with the certificate (SSL only)KeyManagementException- problem in the key management layer (SSL only)
-
-