示例#1
0
  /** Initialize the servlet with the server's sruns. */
  public void init() throws ServletException {
    _pwd = Vfs.lookup();

    String serverAddress = getInitParameter("server-address");
    if (serverAddress != null) addAddress(serverAddress);

    _loadBalancer = _loadBalanceBuilder.create();
  }
示例#2
0
  public FastCGIServlet() {
    LoadBalanceService loadBalanceService = LoadBalanceService.getCurrent();

    if (loadBalanceService == null) {
      throw new IllegalStateException(
          L.l("'{0}' requires an active {1}", this, LoadBalanceService.class.getSimpleName()));
    }

    _loadBalanceBuilder = loadBalanceService.createBuilder();

    _loadBalanceBuilder.setMeterCategory("Resin|FastCGI");
  }
示例#3
0
 /** Sets the host address. */
 public void addAddress(String address) {
   _loadBalanceBuilder.addAddress(address);
 }