Rio Project 4.2 API Documentation
org.rioproject.rmi
Class PortRangeRMIServerSocketFactory
java.lang.Object
org.rioproject.rmi.PortRangeRMIServerSocketFactory
- All Implemented Interfaces:
- RMIServerSocketFactory
public class PortRangeRMIServerSocketFactory
- extends Object
- implements RMIServerSocketFactory
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PortRangeRMIServerSocketFactory
public PortRangeRMIServerSocketFactory(int start,
int end)
- Creates a
RMIServerSocketFactory that allocates
ServerSockets within the given bounds (both inclusive).
- Parameters:
start - The range to start from (inclusive)end - The end of the range (inclusive)
- Throws:
IllegalArgumentException - is either bound is not between
0 and 65535, or if end is < than low.
createServerSocket
public ServerSocket createServerSocket(int port)
throws IOException
- Specified by:
createServerSocket in interface RMIServerSocketFactory
- Throws:
IOException
getLastPort
public int getLastPort()
Copyright © 2006-2011 Rio Project. All Rights Reserved.