org.cdk8s.operator.Server Maven / Gradle / Ivy
Show all versions of cdk8s-operator Show documentation
package org.cdk8s.operator;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.105.0 (build 0a2adcb)", date = "2024-11-16T12:12:35.742Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = org.cdk8s.operator.$Module.class, fqn = "cdk8s-operator.Server")
public class Server extends software.amazon.jsii.JsiiObject {
protected Server(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected Server(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Server(final @org.jetbrains.annotations.NotNull org.cdk8s.operator.ServerProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* Stop server.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void close() {
software.amazon.jsii.Kernel.call(this, "close", software.amazon.jsii.NativeType.VOID);
}
/**
* Starts HTTP server.
*
* @param port The port to listen to.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Number listen(final @org.jetbrains.annotations.Nullable java.lang.Number port) {
return software.amazon.jsii.Kernel.asyncCall(this, "listen", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { port });
}
/**
* Starts HTTP server.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Number listen() {
return software.amazon.jsii.Kernel.asyncCall(this, "listen", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
}
/**
* A fluent builder for {@link org.cdk8s.operator.Server}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create() {
return new Builder();
}
private final org.cdk8s.operator.ServerProps.Builder props;
private Builder() {
this.props = new org.cdk8s.operator.ServerProps.Builder();
}
/**
* The command to execute in order to synthesize the CDK app.
*
* @return {@code this}
* @param appCommand The command to execute in order to synthesize the CDK app. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder appCommand(final java.lang.String appCommand) {
this.props.appCommand(appCommand);
return this;
}
/**
* @return a newly built instance of {@link org.cdk8s.operator.Server}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public org.cdk8s.operator.Server build() {
return new org.cdk8s.operator.Server(
this.props.build()
);
}
}
}