Package org.glassfish.internal.embedded
Interface Ports
-
@Contract public interface PortsManagement interfaces for all embedded ports- Author:
- Jerome Dochez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PortcreatePort(int number)Creates a port, binds it to a port number and returns itCollection<Port>getPorts()Returns the list of allocated ports
-
-
-
Method Detail
-
createPort
Port createPort(int number) throws IOException
Creates a port, binds it to a port number and returns it- Parameters:
number- the port number- Returns:
- the bound port to the port number
- Throws:
IOException- if the port is already taken or another network exception occurs
-
getPorts
Collection<Port> getPorts()
Returns the list of allocated ports- Returns:
- the allocated ports
-
-