public class AddressUtils extends Object
| Constructor and Description |
|---|
AddressUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
maybeAddPortToHost(String contactPoint,
int defaultPort)
Adds the default port to a contact point string, depending on whether it already has a port or
not.
|
@NonNull public static String maybeAddPortToHost(@NonNull String contactPoint, int defaultPort)
This method tries its best to handle ambiguities with IPv6 addresses; however it is advised that IPv6 addresses always be entered in full form to avoid unsolvable ambiguities.
contactPoint - The contact point to inspect.defaultPort - The default port to use.Copyright © 2017–2021 DataStax. All rights reserved.