|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.net.ServerSocketFactory
org.rioproject.net.PortRangeServerSocketFactory
public class PortRangeServerSocketFactory
A ServerSocketFactory that allocates ServerSockets within a port range.
NOTE: The IANA recommends the range 49152-65535, as indicated by the following document: http://www.iana.org/assignments/port-numbers
| Field Summary | |
|---|---|
static int |
RANGE_END
|
| Constructor Summary | |
|---|---|
PortRangeServerSocketFactory(int start)
Creates a ServerSocketFactory that allocates
ServerSockets starting from the provided port and extending to 65535 |
|
PortRangeServerSocketFactory(int start,
int end)
Creates a ServerSocketFactory that allocates
ServerSockets within the given bounds (both inclusive). |
|
| Method Summary | |
|---|---|
ServerSocket |
createServerSocket(int port)
If the port is 0, use the provided range. |
ServerSocket |
createServerSocket(int port,
int backlog)
If the port is 0, use the provided range. |
ServerSocket |
createServerSocket(int port,
int backlog,
InetAddress inetAddress)
If the port is 0, use the provided range. |
boolean |
equals(Object o)
|
int |
getEnd()
|
int |
getLastPort()
|
int |
getStart()
|
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class javax.net.ServerSocketFactory |
|---|
createServerSocket, getDefault |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int RANGE_END
| Constructor Detail |
|---|
public PortRangeServerSocketFactory(int start)
ServerSocketFactory that allocates
ServerSockets starting from the provided port and extending to 65535
start - The range to start from (inclusive)
IllegalArgumentException - is not between 0 and 65535.
public PortRangeServerSocketFactory(int start,
int end)
ServerSocketFactory that allocates
ServerSockets within the given bounds (both inclusive).
start - The range to start from (inclusive)end - The end of the range (inclusive)
IllegalArgumentException - is not between 0 and 65535,
or if end is < than low.| Method Detail |
|---|
public int getStart()
public int getEnd()
public int getLastPort()
public ServerSocket createServerSocket(int port)
throws IOException
createServerSocket in class ServerSocketFactoryport - The port to create.
IOException - If the port cannot be created.
IllegalArgumentException - if a non-zero port is provided that is outside of the range
public ServerSocket createServerSocket(int port,
int backlog)
throws IOException
createServerSocket in class ServerSocketFactoryport - The port to create.backlog - The backlog, how many connections are queued
IOException - If the port cannot be created.
IllegalArgumentException - if a non-zero port is provided that is outside of the range
public ServerSocket createServerSocket(int port,
int backlog,
InetAddress inetAddress)
throws IOException
createServerSocket in class ServerSocketFactoryport - The port to create.backlog - The backlog, how many connections are queuedinetAddress - The network interface address to use
IOException - If the port cannot be created.
IllegalArgumentException - if a non-zero port is provided that is outside of the rangepublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||