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 |
DEFAULT_NETWORK_HOST
By default, we bind to loopback interfaces
|
deprecationLogger, 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[] |
resolveBindHostAddresses(String[] bindHosts)
Resolves
bindHosts to a list of internet addresses. |
InetAddress |
resolvePublishHostAddresses(String[] publishHosts)
Resolves
publishHosts to a single publish address. |
logDeprecatedSetting, logRemovedSetting, nodeNamepublic static final String DEFAULT_NETWORK_HOST
public void addCustomNameResolver(NetworkService.CustomNameResolver customNameResolver)
public InetAddress[] resolveBindHostAddresses(String[] bindHosts) throws IOException
bindHosts to a list of internet addresses. The list will
not contain duplicate addresses.bindHosts - list of hosts to bind to. this may contain special pseudo-hostnames
such as _local_ (see the documentation). if it is null, it will be populated
based on global default settings.IOExceptionpublic InetAddress resolvePublishHostAddresses(String[] publishHosts) throws IOException
publishHosts to a single publish address. The fact that it returns
only one address is just a current limitation.
If publishHosts resolves to more than one address, then one is selected with magic
publishHosts - list of hosts to publish as. this may contain special pseudo-hostnames
such as _local_ (see the documentation). if it is null, it will be populated
based on global default settings.IOExceptionCopyright © 2009–2016. All rights reserved.