java.lang.Object | |
↳ | javax.net.ServerSocketFactory |
![]() |
![]() |
This class creates server sockets. It may be subclassed by other factories, which create particular types of server sockets. This provides a general framework for the addition of public socket-level functionality. It is the server side analogue of a socket factory, and similarly provides a way to capture a variety of policies related to the sockets being constructed.
Like socket factories, server Socket factory instances have methods used to create sockets. There is also an environment specific default server socket factory; frameworks will often use their own customized factory.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a server socket factory.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a server socket bound to the specified port.
| |||||||||||
Returns a server socket bound to the specified port,
with a specified listen backlog and local IP.
| |||||||||||
Returns a server socket bound to the specified port, and uses the
specified connection backlog.
| |||||||||||
Returns an unbound server socket.
| |||||||||||
Returns a copy of the environment's default socket factory.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a server socket factory.
Returns a server socket bound to the specified port. The socket is configured with the socket options (such as accept timeout) given to this factory.
port | the port to listen to |
---|
ServerSocket
IOException | for networking errors |
---|
Returns a server socket bound to the specified port,
with a specified listen backlog and local IP.
The ifAddress
argument can be used on a multi-homed
host for a ServerSocket
that will only accept connect
requests to one of its addresses. If ifAddress
is null,
it will accept connections on all local addresses. The socket is
configured with the socket options (such as accept timeout) given
to this factory.
port | the port to listen to |
---|---|
backlog | how many connections are queued |
ifAddress | the network interface address to use |
ServerSocket
IOException | for networking errors |
---|
Returns a server socket bound to 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.
port | the port to listen to |
---|---|
backlog | how many connections are queued |
ServerSocket
IOException | for networking errors |
---|
Returns an unbound server socket. The socket is configured with the socket options (such as accept timeout) given to this factory.
IOException | if the socket cannot be created |
---|
Returns a copy of the environment's default socket factory.
ServerSocketFactory