Package org.glassfish.internal.embedded
Interface Ports
@Contract
public interface Ports
Management interfaces for all embedded ports
- Author:
- Jerome Dochez
-
Method Summary
Modifier and TypeMethodDescriptioncreatePort(int number) Creates a port, binds it to a port number and returns itgetPorts()Returns the list of allocated ports
-
Method Details
-
createPort
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
-