public class DefaultSocketFactory extends ServerSocketFactory implements RMIServerSocketFactory, Serializable
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
ServerSocket |
createServerSocket(int port)
Create a server socket on the specified port (port 0 indicates
an anonymous port).
|
ServerSocket |
createServerSocket(int port,
int backlog) |
ServerSocket |
createServerSocket(int port,
int backlog,
InetAddress inetAddress) |
boolean |
equals(Object obj) |
String |
getBindAddress() |
int |
hashCode() |
void |
setBindAddress(String host) |
String |
toString() |
createServerSocket, getDefault
public DefaultSocketFactory()
public DefaultSocketFactory(InetAddress bindAddress)
bindAddress
- public DefaultSocketFactory(int backlog)
backlog
- public DefaultSocketFactory(InetAddress bindAddress, int backlog)
bindAddress
- backlog
- public String getBindAddress()
public void setBindAddress(String host) throws UnknownHostException
UnknownHostException
public ServerSocket createServerSocket(int port) throws IOException
createServerSocket
in interface RMIServerSocketFactory
createServerSocket
in class ServerSocketFactory
port
- the port numberIOException
- if an I/O error occurs during server socket
creationpublic ServerSocket createServerSocket(int port, int backlog) throws IOException
createServerSocket
in class ServerSocketFactory
port
- - the port to listen tobacklog
- - how many connections are queuedIOException
public ServerSocket createServerSocket(int port, int backlog, InetAddress inetAddress) throws IOException
createServerSocket
in class ServerSocketFactory
port
- - the port to listen tobacklog
- - how many connections are queuedinetAddress
- - the network interface address to useIOException
Copyright © 2018 JBoss by Red Hat. All rights reserved.