org.elasticsearch.util.network
Class NetworkService

java.lang.Object
  extended by org.elasticsearch.util.component.AbstractComponent
      extended by org.elasticsearch.util.network.NetworkService

public class NetworkService
extends AbstractComponent


Nested Class Summary
static interface NetworkService.CustomNameResolver
           
static class NetworkService.TcpSettings
           
 
Field Summary
static java.lang.String LOCAL
           
 
Fields inherited from class org.elasticsearch.util.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
NetworkService(Settings settings)
           
 
Method Summary
 void addCustomNameResolver(java.lang.String name, NetworkService.CustomNameResolver customNameResolver)
           
 java.net.InetAddress resolveBindHostAddress(java.lang.String bindHost)
           
 java.net.InetAddress resolveBindHostAddress(java.lang.String bindHost, java.lang.String defaultValue2)
           
 java.net.InetAddress resolveInetAddress(java.lang.String host, java.lang.String defaultValue1, java.lang.String defaultValue2)
           
 java.net.InetAddress resolvePublishHostAddress(java.lang.String publishHost)
           
 java.net.InetAddress resolvePublishHostAddress(java.lang.String publishHost, java.lang.String defaultValue2)
           
 
Methods inherited from class org.elasticsearch.util.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCAL

public static final java.lang.String LOCAL
See Also:
Constant Field Values
Constructor Detail

NetworkService

@Inject
public NetworkService(Settings settings)
Method Detail

addCustomNameResolver

public void addCustomNameResolver(java.lang.String name,
                                  NetworkService.CustomNameResolver customNameResolver)

resolveBindHostAddress

public java.net.InetAddress resolveBindHostAddress(java.lang.String bindHost)
                                            throws java.io.IOException
Throws:
java.io.IOException

resolveBindHostAddress

public java.net.InetAddress resolveBindHostAddress(java.lang.String bindHost,
                                                   java.lang.String defaultValue2)
                                            throws java.io.IOException
Throws:
java.io.IOException

resolvePublishHostAddress

public java.net.InetAddress resolvePublishHostAddress(java.lang.String publishHost)
                                               throws java.io.IOException
Throws:
java.io.IOException

resolvePublishHostAddress

public java.net.InetAddress resolvePublishHostAddress(java.lang.String publishHost,
                                                      java.lang.String defaultValue2)
                                               throws java.io.IOException
Throws:
java.io.IOException

resolveInetAddress

public java.net.InetAddress resolveInetAddress(java.lang.String host,
                                               java.lang.String defaultValue1,
                                               java.lang.String defaultValue2)
                                        throws java.net.UnknownHostException,
                                               java.io.IOException
Throws:
java.net.UnknownHostException
java.io.IOException