Class Port


  • public class Port
    extends Object
    Model that defines a port being used by a service, including the port number, the purpose of the port, and whether the port is secure or not.

    For the type/purpose of the port, we are assuming that a service has a separate ports for the main application and the administrative endpoints (e.g. status and health checks)

    • Constructor Detail

      • Port

        public Port()
    • Method Detail

      • of

        public static Port of​(int number,
                              @Nullable
                              Port.PortType portType,
                              @Nullable
                              Port.Security security)
        Convenience factory method to create a new Port.

        Default values are assigned to the port type and security if null arguments are supplied.

        Parameters:
        number - the port number, must be in range 0 to 65535
        portType - the type of port (defaults to APPLICATION if null)
        security - is the port secure? (defaults to SECURE if null)
        Returns:
        a new instance