Class DefaultPortType
java.lang.Object
org.jvnet.hudson.plugins.port_allocator.PortType
org.jvnet.hudson.plugins.port_allocator.DefaultPortType
- All Implemented Interfaces:
ExtensionPoint
,Describable<PortType>
,Serializable
Plain TCP port that doesn't have
any special clean up processing.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocate
(AbstractBuild<?, ?> build, PortAllocationManager manager, int prefPort, Launcher launcher, BuildListener buildListener) Allocates a new port for a given build.Methods inherited from class org.jvnet.hudson.plugins.port_allocator.PortType
getFixedPort, isFixedPort
-
Constructor Details
-
DefaultPortType
-
-
Method Details
-
allocate
public Port allocate(AbstractBuild<?, ?> build, PortAllocationManager manager, int prefPort, Launcher launcher, BuildListener buildListener) throws IOException, InterruptedExceptionDescription copied from class:PortType
Allocates a new port for a given build.- Specified by:
allocate
in classPortType
- Parameters:
build
- the build that will use the allocated portmanager
- can be used to assign a new TCP port numberprefPort
- port number allocated to this type the last timelauncher
- launcher used to perform operations for the buildbuildListener
- listener that receives information about the build- Throws:
IOException
InterruptedException
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<PortType>
- Specified by:
getDescriptor
in classPortType
-