public class DefaultServerSocketFactory extends Object implements ServerSocketFactory
Constructor and Description |
---|
DefaultServerSocketFactory(AbstractEndpoint<?> endpoint) |
Modifier and Type | Method and Description |
---|---|
Socket |
acceptSocket(ServerSocket socket)
Wrapper function for accept().
|
ServerSocket |
createSocket(int port)
Returns a server socket which uses all network interfaces on the host,
and is bound to a the specified port.
|
ServerSocket |
createSocket(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.
|
ServerSocket |
createSocket(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.
|
void |
handshake(Socket sock)
Triggers the SSL handshake.
|
public DefaultServerSocketFactory(AbstractEndpoint<?> endpoint)
endpoint
- Unused in this implementation.public ServerSocket createSocket(int port) throws IOException
ServerSocketFactory
createSocket
in interface ServerSocketFactory
port
- the port to listen toIOException
- for networking errorspublic ServerSocket createSocket(int port, int backlog) throws IOException
ServerSocketFactory
createSocket
in interface ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queuedIOException
- for networking errorspublic ServerSocket createSocket(int port, int backlog, InetAddress ifAddress) throws IOException
ServerSocketFactory
createSocket
in interface ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queuedifAddress
- the network interface address to useIOException
- for networking errorspublic Socket acceptSocket(ServerSocket socket) throws IOException
ServerSocketFactory
acceptSocket
in interface ServerSocketFactory
IOException
public void handshake(Socket sock) throws IOException
ServerSocketFactory
handshake
in interface ServerSocketFactory
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.