/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jk.status; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import org.apache.tools.ant.BuildException; /** * Ant task that implements the /status update loadbalancer command, supported by the * mod_jk status (1.2.20) application. * * * @author Peter Rossbach * @version $Revision: 611693 $ * @since mod_jk 1.2.20 */ public class JkStatusUpdateLoadbalancerTask extends AbstractJkStatusTask { /** * The descriptive information about this implementation. */ private static final String info = "org.apache.jk.status.JkStatusUpdateLoadbalancerTask/1.0"; protected String loadbalancer ; protected int retries = -1; protected int recoverWaitTime = -1; protected int methodCode = -1; protected String method; protected Boolean stickySession ; protected Boolean forceStickySession ; protected int lockCode = -1; protected String lock; protected int maxReplyTimeouts = -1; /** * Return descriptive information about this implementation and the * corresponding version number, in the format * <description>/<version>. */ public String getInfo() { return (info); } /** * */ public JkStatusUpdateLoadbalancerTask() { super(); setUrl("http://localhost/jkstatus"); } /** * @return the forceStickySession */ public Boolean getForceStickySession() { return forceStickySession; } /** * @param forceStickySession the forceStickySession to set */ public void setForceStickySession(Boolean forceStickySession) { this.forceStickySession = forceStickySession; } /** * @return the loadbalancer */ public String getLoadbalancer() { return loadbalancer; } /** * @param loadbalancer the loadbalancer to set */ public void setLoadbalancer(String loadbalancer) { this.loadbalancer = loadbalancer; } /** * @return the locking */ public String getLock() { return lock; } /** * @param locking the locking to set */ public void setLock(String locking) { this.lock = locking; } /** * @return the lockingCode */ public int getLockCode() { return lockCode; } /** * @param lockingCode the lockingCode to set */ public void setLockCode(int lockingCode) { this.lockCode = lockingCode; } /** * @return the method */ public String getMethod() { return method; } /** * @param method the method to set */ public void setMethod(String method) { this.method = method; } /** * @return the methodCode */ public int getMethodCode() { return methodCode; } /** * @param methodCode the methodCode to set */ public void setMethodCode(int methodCode) { this.methodCode = methodCode; } /** * @return the recoverWaitTime */ public int getRecoverWaitTime() { return recoverWaitTime; } /** * @param recoverWaitTime the recoverWaitTime to set */ public void setRecoverWaitTime(int recoverWaitTime) { this.recoverWaitTime = recoverWaitTime; } /** * @return the retries */ public int getRetries() { return retries; } /** * @param retries the retries to set */ public void setRetries(int retries) { this.retries = retries; } /** * @return the stickySession */ public Boolean getStickySession() { return stickySession; } /** * @param stickySession the stickySession to set */ public void setStickySession(Boolean stickySession) { this.stickySession = stickySession; } /** * @return the maxReplyTimeouts */ public int getMaxReplyTimeouts() { return maxReplyTimeouts; } /** * @param maxReplyTimeouts the maxReplyTimeouts to set */ public void setMaxReplyTimeouts(int maxReplyTimeouts) { this.maxReplyTimeouts = maxReplyTimeouts; } /** * Create JkStatus worker update link *