brooklyn.location.access.PortMapping Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brooklyn-core Show documentation
Show all versions of brooklyn-core Show documentation
Entity implementation classes, events, and other core elements
package brooklyn.location.access;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.Objects;
import brooklyn.location.Location;
public class PortMapping {
public PortMapping(String publicIpId, int publicPort, Location target, int privatePort) {
super();
this.publicIpId = checkNotNull(publicIpId, "publicIpId");
this.publicPort = publicPort;
this.target = target;
this.privatePort = privatePort;
}
final String publicIpId;
final int publicPort;
final Location target;
final int privatePort;
// CIDR's ?
public int getPublicPort() {
return publicPort;
}
public Location getTarget() {
return target;
}
public int getPrivatePort() {
return privatePort;
}
@Override
public String toString() {
return Objects.toStringHelper(this).add("public", publicIpId+":"+publicPort).
add("private", target+":"+privatePort).toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy