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) |
nodeName
public static final String LOCAL
public void addCustomNameResolver(NetworkService.CustomNameResolver customNameResolver)
public InetAddress resolveBindHostAddress(String bindHost) throws IOException
IOException
public InetAddress resolveBindHostAddress(String bindHost, String defaultValue2) throws IOException
IOException
public InetAddress resolvePublishHostAddress(String publishHost) throws IOException
IOException
public InetAddress resolvePublishHostAddress(String publishHost, String defaultValue2) throws IOException
IOException
public InetAddress resolveInetAddress(String host, String defaultValue1, String defaultValue2) throws UnknownHostException, IOException
UnknownHostException
IOException
Copyright © 2009–2015. All rights reserved.