org.cloudfoundry.client.lib.domain.CloudRoute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudfoundry-client-lib Show documentation
Show all versions of cloudfoundry-client-lib Show documentation
A Cloud Foundry client library for Java
The newest version!
package org.cloudfoundry.client.lib.domain;
import org.cloudfoundry.client.lib.domain.annotation.Nullable;
import org.immutables.value.Value;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@Value.Immutable
@JsonSerialize(as = ImmutableCloudRoute.class)
@JsonDeserialize(as = ImmutableCloudRoute.class)
public abstract class CloudRoute extends CloudEntity implements Derivable {
@Value.Default
public int getAppsUsingRoute() {
return 0;
}
@Value.Default
public boolean hasServiceUsingRoute() {
return false;
}
@Nullable
public abstract CloudDomain getDomain();
@Nullable
public abstract String getHost();
@Nullable
public abstract String getPath();
@Override
public String getName() {
return getHost() + "." + getDomain();
}
public boolean isUsed() {
return getAppsUsingRoute() > 0 || hasServiceUsingRoute();
}
@Override
public CloudRoute derive() {
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy