Package org.rioproject.net

Examples of org.rioproject.net.PortRangeServerSocketFactory.createServerSocket()


     * @throws IllegalArgumentException is either bound is not between
     * 0 and 65535, or if <code>end</code> is &lt; than <code>low</code>.
     */
    public static int getPortFromRange(final int start, final int end) throws IOException {
        PortRangeServerSocketFactory factory = new PortRangeServerSocketFactory(start, end);
        ServerSocket ss = factory.createServerSocket(0);
        int p = factory.getLastPort();
        ss.close();
        return(p);
    }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.