Class InetAddressBean
- java.lang.Object
-
- com.atlassian.bamboo.configuration.InetAddressBean
-
public class InetAddressBean extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Iterable<InetAddress>findLoopbacks()static @Nullable StringgetCanonicalLocalHostName()static @Nullable StringgetLocalCanonicalHostName(@Nullable String defaultName)static Optional<InetAddress>getLocalHostAddress()static StringgetLocalHostAddress(String defaultAddress)Deprecated.since 6.7 usegetLocalHostAddress()insteadstatic Optional<String>getLocalHostAddressForUrl()Returns the address of the local host or defaultAddress if local host could not be found.static @Nullable StringgetLocalHostName(@Nullable String defaultName)Returns the name of the local host or defaultName if local host could not be foundstatic @NotNull InetAddressgetLoopback()
-
-
-
Method Detail
-
getCanonicalLocalHostName
@Nullable public static @Nullable String getCanonicalLocalHostName()
- Returns:
- Canonical name of the local host or null if it could not be found
-
getLocalCanonicalHostName
@Nullable public static @Nullable String getLocalCanonicalHostName(@Nullable @Nullable String defaultName)
- Parameters:
defaultName-- Returns:
- Canonical name of the local host. If it fails the defaultName will be returned
-
getLocalHostName
@Nullable public static @Nullable String getLocalHostName(@Nullable @Nullable String defaultName)
Returns the name of the local host or defaultName if local host could not be found- Parameters:
defaultName-- Returns:
-
getLocalHostAddress
@Deprecated public static String getLocalHostAddress(String defaultAddress)
Deprecated.since 6.7 usegetLocalHostAddress()insteadReturns the address of the local host or defaultAddress if local host could not be found
-
getLocalHostAddress
public static Optional<InetAddress> getLocalHostAddress()
-
getLocalHostAddressForUrl
public static Optional<String> getLocalHostAddressForUrl()
Returns the address of the local host or defaultAddress if local host could not be found. The address can be used directly in an URL - IPv6 addresses are already correctly formatted.
-
findLoopbacks
public static Iterable<InetAddress> findLoopbacks()
-
getLoopback
@NotNull public static @NotNull InetAddress getLoopback()
-
-