Interface PortHub<PORT extends Port<PM>,​PM extends PortMetrics>

    • Method Detail

      • ports

        PORT[] ports()
              throws IOException
        Lists the available ports of the system.
        Returns:
        An array of available Port instances, if there are no ports than an empty array (size 0) is returned.
        Throws:
        IOException - Thrown in case accessing the list of Port instances failed due to I/O problems.
      • ports

        default PORT[] ports​(String aPattern)
                      throws IOException
        Returns the available ports of the system which's AliasAccessor.getAlias() matches the given pattern.
        Parameters:
        aPattern - The pattern of the AliasAccessor.getAlias() to match. A "*" stands for any chars, "?" stands for a single name (similar to filename wildcards).
        Returns:
        An array of available Port instances which's AliasAccessor.getAlias() matches the given pattern or an empty array (size = 0) if there are none such ports.
        Throws:
        IOException - Thrown in case accessing the list of Port instances failed due to I/O problems.