public class FreePort extends Object
Constructor and Description |
---|
FreePort(int from,
int to) |
Modifier and Type | Method and Description |
---|---|
int |
getPort()
Finds a free socket upon first calll and returns the same for every next call.
|
String |
toString() |
public FreePort(int from, int to)
from
- Begin of range to search for free port (including)to
- End of range to search for free port (including)public int getPort()
RuntimeException
- if no port has been found. (TODO change this to an apropriate checked exception)Copyright © 2006–2019 OPS4J - Open Participation Software for Java. All rights reserved.