public class PortRangeServerSocketFactory extends Object implements ServerSocketFactory, Configurable
Modifier and Type | Field and Description |
---|---|
static String |
MAX_PROP |
static String |
MIN_PROP |
Constructor and Description |
---|
PortRangeServerSocketFactory() |
PortRangeServerSocketFactory(ServerSocketFactory delegate) |
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration config) |
ServerSocket |
createServerSocket(int port) |
ServerSocket |
createServerSocket(int port,
int backlog)
Returns a server socket which uses all network interfaces on
the host, and is bound to the specified port.
|
ServerSocket |
createServerSocket(int port,
int backlog,
InetAddress ifAddress)
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.
|
protected int |
getPortProperty(Configuration config,
String name) |
public static final String MIN_PROP
public static final String MAX_PROP
public PortRangeServerSocketFactory(ServerSocketFactory delegate)
public PortRangeServerSocketFactory()
public void configure(Configuration config) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public ServerSocket createServerSocket(int port, int backlog) throws IOException
ServerSocketFactory
createServerSocket
in interface ServerSocketFactory
port
- - the port to listen tobacklog
- - how many connections are queuedIOException
- - for networking errorspublic ServerSocket createServerSocket(int port, int backlog, InetAddress ifAddress) throws IOException
ServerSocketFactory
createServerSocket
in interface ServerSocketFactory
port
- - the port to listen tobacklog
- - how many connections are queuedIOException
- - for networking errorspublic ServerSocket createServerSocket(int port) throws BindException
createServerSocket
in interface ServerSocketFactory
BindException
protected int getPortProperty(Configuration config, String name) throws ConfigurationException
ConfigurationException
Copyright © 2017 JacORB. All rights reserved.