Package org.huihoo.willow.core

Examples of org.huihoo.willow.core.StandardNamingServer


   * Create, configure, and return an NamingServer
   */
  public NamingServer createNamingServer(String address, int port, String scheme)
  {
    log.debug("Creating namingServer");
    StandardNamingServer namingServer = new StandardNamingServer();
    namingServer.setDebug(debug);
    namingServer.setPort(port);
    namingServer.setScheme(scheme);
    if (address != null)
    {
      /*
       * InetAddress.toString() returns a string of the form
       * "<hostname>/<literal_IP>". Get the latter part, so that the
       * address can be parsed (back) into an InetAddress using
       * InetAddress.getByName().
       */
      int index = address.indexOf('/');
      if (index != -1)
      {
        address = address.substring(index + 1);
      }
    }
    if (address != null)
    {
      namingServer.setAddress(address);
    }
    log.debug(
      "Creating connector for address='" + ((address == null) ? "ALL" : address.toString()) + "' port='" + port + "' scheme='" + scheme + "'");
    return (namingServer);
  }
View Full Code Here

TOP

Related Classes of org.huihoo.willow.core.StandardNamingServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.