@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.025Z") @Stability(value=Stable) public class Endpoint extends software.amazon.jsii.JsiiObject
Consists of a combination of hostname and port.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.docdb.*;
Endpoint endpoint = new Endpoint("address", 123);
| Modifier | Constructor and Description |
|---|---|
protected |
Endpoint(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Endpoint(software.amazon.jsii.JsiiObjectRef objRef) |
|
Endpoint(String address,
Number port)
Constructs an Endpoint instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getHostname()
The hostname of the endpoint.
|
Number |
getPort()
The port number of the endpoint.
|
String |
getSocketAddress()
The combination of ``HOSTNAME:PORT`` for this endpoint.
|
String |
portAsString()
Returns the port number as a string representation that can be used for embedding within other strings.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Endpoint(software.amazon.jsii.JsiiObjectRef objRef)
protected Endpoint(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public String portAsString()
This is intended to deal with CDK's token system. Numeric CDK tokens are not expanded when their string representation is embedded in a string. This function returns the port either as an unresolved string token or as a resolved string representation of the port value.
@Stability(value=Stable) @NotNull public String getHostname()
@Stability(value=Stable) @NotNull public Number getPort()
This can potentially be a CDK token. If you need to embed the port in a string (e.g. instance user data script), use {@link Endpoint.portAsString}.
@Stability(value=Stable) @NotNull public String getSocketAddress()
Copyright © 2022. All rights reserved.