allocate
public Port allocate(AbstractBuild<?,?> build,
PortAllocationManager manager,
int prefPort,
Launcher launcher,
BuildListener buildListener)
throws IOException,
InterruptedException
Try to allocate one free port from the given pool.
Wait for a short period if no free port is available, then try again.
- Specified by:
allocate
in class PortType
- Parameters:
build
- the build that will use the allocated port
manager
- can be used to assign a new TCP port number
prefPort
- port number allocated to this type the last time
launcher
- launcher used to perform operations for the build
buildListener
- listener that receives information about the build
- Throws:
IOException
InterruptedException