/** 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(); }
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"); }
/** Sets the host address. */ public void addAddress(String address) { _loadBalanceBuilder.addAddress(address); }