Class PortMapping


  • public class PortMapping
    extends Object
    Represents a port exposed by a Docker container.
    • Constructor Detail

      • PortMapping

        public PortMapping​(int containerPort,
                           @Nullable
                           @Nullable Integer hostPort)
    • Method Detail

      • getContainerPort

        public int getContainerPort()
        Returns:
        the exposed container port.
      • getHostPort

        @Nullable
        public @Nullable Integer getHostPort()
        Returns:
        the mapped host port. May be null if the host port is to be dynamically bound to the exposed container port.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object