public final class NetworkService
extends java.lang.Object
Modifier and Type | Class | 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.
|
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
DEFAULT_NETWORK_HOST |
By default, we bind to loopback interfaces
|
static Setting<java.util.List<java.lang.String>> |
GLOBAL_NETWORK_BINDHOST_SETTING |
|
static Setting<java.util.List<java.lang.String>> |
GLOBAL_NETWORK_HOST_SETTING |
|
static Setting<java.util.List<java.lang.String>> |
GLOBAL_NETWORK_PUBLISHHOST_SETTING |
|
static Setting<java.lang.Boolean> |
NETWORK_SERVER |
|
static Setting<TimeValue> |
TCP_CONNECT_TIMEOUT |
|
static Setting<java.lang.Boolean> |
TCP_KEEP_ALIVE |
|
static Setting<java.lang.Boolean> |
TCP_NO_DELAY |
|
static Setting<ByteSizeValue> |
TCP_RECEIVE_BUFFER_SIZE |
|
static Setting<java.lang.Boolean> |
TCP_REUSE_ADDRESS |
|
static Setting<ByteSizeValue> |
TCP_SEND_BUFFER_SIZE |
Constructor | Description |
---|---|
NetworkService(java.util.List<NetworkService.CustomNameResolver> customNameResolvers) |
Modifier and Type | Method | Description |
---|---|---|
java.net.InetAddress[] |
resolveBindHostAddresses(java.lang.String[] bindHosts) |
Resolves
bindHosts to a list of internet addresses. |
java.net.InetAddress |
resolvePublishHostAddresses(java.lang.String[] publishHosts) |
Resolves
publishHosts to a single publish address. |
public static final java.lang.String DEFAULT_NETWORK_HOST
public static final Setting<java.util.List<java.lang.String>> GLOBAL_NETWORK_HOST_SETTING
public static final Setting<java.util.List<java.lang.String>> GLOBAL_NETWORK_BINDHOST_SETTING
public static final Setting<java.util.List<java.lang.String>> GLOBAL_NETWORK_PUBLISHHOST_SETTING
public static final Setting<java.lang.Boolean> NETWORK_SERVER
public static final Setting<java.lang.Boolean> TCP_NO_DELAY
public static final Setting<java.lang.Boolean> TCP_KEEP_ALIVE
public static final Setting<java.lang.Boolean> TCP_REUSE_ADDRESS
public static final Setting<ByteSizeValue> TCP_SEND_BUFFER_SIZE
public static final Setting<ByteSizeValue> TCP_RECEIVE_BUFFER_SIZE
public NetworkService(java.util.List<NetworkService.CustomNameResolver> customNameResolvers)
public java.net.InetAddress[] resolveBindHostAddresses(java.lang.String[] bindHosts) throws java.io.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 fall back to _local_java.io.IOException
public java.net.InetAddress resolvePublishHostAddresses(java.lang.String[] publishHosts) throws java.io.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 fall back to _local_java.io.IOException