@Override public boolean equals(Object obj) { if (obj instanceof PortBinding) { PortBinding other = (PortBinding) obj; return new EqualsBuilder().append(binding, other.getBinding()).append(exposedPort, other.getExposedPort()) .isEquals(); } else { return super.equals(obj); } }
/** * @return the port on which to check if the container is ready * @deprecated see {@link GenericContainer#getLivenessCheckPorts()} for replacement */ @Deprecated protected Integer getLivenessCheckPort() { // legacy implementation for backwards compatibility if (exposedPorts.size() > 0) { return getMappedPort(exposedPorts.get(0)); } else if (portBindings.size() > 0) { return Integer.valueOf(PortBinding.parse(portBindings.get(0)).getBinding().getHostPortSpec()); } else { return null; } }
/** * Adds the specified {@link PortBinding}(s) to the list of {@link PortBinding}s. */ public void add(PortBinding... portBindings) { for (PortBinding binding : portBindings) { bind(binding.getExposedPort(), binding.getBinding()); } }
@Override public boolean equals(Object obj) { if (obj instanceof PortBinding) { PortBinding other = (PortBinding) obj; return new EqualsBuilder().append(binding, other.getBinding()).append(exposedPort, other.getExposedPort()) .isEquals(); } else { return super.equals(obj); } }
/** * Adds the specified {@link PortBinding}(s) to the list of {@link PortBinding}s. */ public void add(PortBinding... portBindings) { for (PortBinding binding : portBindings) { bind(binding.getExposedPort(), binding.getBinding()); } }
/** * @return the port on which to check if the container is ready * @deprecated see {@link GenericContainer#getLivenessCheckPorts()} for replacement */ @Deprecated protected Integer getLivenessCheckPort() { // legacy implementation for backwards compatibility if (exposedPorts.size() > 0) { return getMappedPort(exposedPorts.get(0)); } else if (portBindings.size() > 0) { return Integer.valueOf(PortBinding.parse(portBindings.get(0)).getBinding().getHostPortSpec()); } else { return null; } }