Package sunlabs.brazil.server

Examples of sunlabs.brazil.server.Server


        "creating subserver " + name);

      String handler = props.getProperty(name + ".handler",
        FileHandler.class.getName());

      Server sub = new Server(server.listen, handler, props);
      sub.hostName = props.getProperty(name + ".host", name);
      sub.prefix = name;
      try {
    String str = props.getProperty(name + ".log");
    sub.logLevel = Integer.decode(str).intValue();
      } catch (Exception e) {
    sub.logLevel = server.logLevel;
      }

      if (sub.init()) {
          servers.addElement(new Host(sub.hostName, sub));
      }
  }
  return (servers.size() > 0);
    }
View Full Code Here


  String host = request.getRequestHeader("Host");
  if (host == null) {
      return false;
  }
  for(int i=0;i<servers.size();i++) {
      Server server=((Host)(servers.elementAt(i))).getServer(host);
      if (server != null) {
          request.server = server;
          return server.handler.respond(request);
      }
  }
View Full Code Here

TOP

Related Classes of sunlabs.brazil.server.Server

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.