com.day.cq.testing.socket
Class RandomPortSelector
java.lang.Object
com.day.cq.testing.socket.RandomPortSelector
public class RandomPortSelector
- extends Object
Select an available server port at random
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomPortSelector
public RandomPortSelector()
getRandomServerPortNumber
public int getRandomServerPortNumber()
throws IOException
- Return an available port number, at random.
Note that the port is freed before returning it,
so another process could possibly grab it before
a server socket is opened on it.
- Throws:
IOException
Copyright © 2008 Day Management AG. All Rights Reserved.