public class NetworkService extends AbstractComponent
| Modifier and Type | Class and Description |
|---|---|
static interface |
NetworkService.CustomNameResolver
A custom name resolver can support custom lookup keys (my_net_key:ipv4) and also change
the default inet address used in case no settings is provided.
|
static class |
NetworkService.TcpSettings |
| Modifier and Type | Field and Description |
|---|---|
static String |
LOCAL |
componentSettings, logger, settings| Constructor and Description |
|---|
NetworkService(Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomNameResolver(NetworkService.CustomNameResolver customNameResolver)
Add a custom name resolver.
|
InetAddress |
resolveBindHostAddress(String bindHost) |
InetAddress |
resolveBindHostAddress(String bindHost,
String defaultValue2) |
InetAddress |
resolveInetAddress(String host,
String defaultValue1,
String defaultValue2) |
InetAddress |
resolvePublishHostAddress(String publishHost) |
InetAddress |
resolvePublishHostAddress(String publishHost,
String defaultValue2) |
nodeNamepublic static final String LOCAL
public void addCustomNameResolver(NetworkService.CustomNameResolver customNameResolver)
public InetAddress resolveBindHostAddress(String bindHost) throws IOException
IOExceptionpublic InetAddress resolveBindHostAddress(String bindHost, String defaultValue2) throws IOException
IOExceptionpublic InetAddress resolvePublishHostAddress(String publishHost) throws IOException
IOExceptionpublic InetAddress resolvePublishHostAddress(String publishHost, String defaultValue2) throws IOException
IOExceptionpublic InetAddress resolveInetAddress(String host, String defaultValue1, String defaultValue2) throws UnknownHostException, IOException
UnknownHostExceptionIOExceptionCopyright © 2009–2016. All rights reserved.