congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NetUtils.getHostName
Code IndexAdd Tabnine to your IDE (free)

How to use
getHostName
method
in
org.apache.servicecomb.foundation.common.net.NetUtils

Best Java code snippets using org.apache.servicecomb.foundation.common.net.NetUtils.getHostName (Showing top 2 results out of 315)

origin: apache/servicecomb-java-chassis

public static String getPublishHostName() {
 String publicAddressSetting =
   DynamicPropertyFactory.getInstance().getStringProperty(PUBLISH_ADDRESS, "").get();
 publicAddressSetting = publicAddressSetting.trim();
 if (publicAddressSetting.isEmpty()) {
  return NetUtils.getHostName();
 }
 if (publicAddressSetting.startsWith("{") && publicAddressSetting.endsWith("}")) {
  return NetUtils
    .ensureGetInterfaceAddress(publicAddressSetting.substring(1, publicAddressSetting.length() - 1))
    .getHostName();
 }
 return publicAddressSetting;
}
origin: org.apache.servicecomb/service-registry

public static String getPublishHostName() {
 String publicAddressSetting =
   DynamicPropertyFactory.getInstance().getStringProperty(PUBLISH_ADDRESS, "").get();
 publicAddressSetting = publicAddressSetting.trim();
 if (publicAddressSetting.isEmpty()) {
  return NetUtils.getHostName();
 }
 if (publicAddressSetting.startsWith("{") && publicAddressSetting.endsWith("}")) {
  return NetUtils
    .ensureGetInterfaceAddress(publicAddressSetting.substring(1, publicAddressSetting.length() - 1))
    .getHostName();
 }
 return publicAddressSetting;
}
org.apache.servicecomb.foundation.common.netNetUtilsgetHostName

Popular methods of NetUtils

  • parseIpPortFromURI
  • canTcpListen
  • parseIpPort
  • doGetHostNameAndHostAddress
  • doGetIpv4AddressFromNetworkInterface
    docker环境中,有时无法通过InetAddress.getLocalHost()获取 ,会报unknown host Exception, system error 此时,通过遍历网卡接口的方式规
  • ensureGetInterfaceAddress
  • getHostAddress
  • getRealListenAddress
    对于配置为0.0.0.0的地址,let it go schema, e.g. http adddress, e.g 0.0.0.0:8080 return 实际监听的地址
  • humanReadableBytes

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now