/*
* 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 worker command, supported by the
* mod_jk status (1.2.20) application.
*
*
* @author Peter Rossbach
* @version $Revision: 802231 $
* @since mod_jk 1.2.20
*/
public class JkStatusUpdateWorkerTask extends AbstractJkStatusTask {
/**
* The descriptive information about this implementation.
*/
private static final String info = "org.apache.jk.status.JkStatusUpdateWorkerTask/1.0";
protected String loadbalancer ;
protected String worker ;
protected int loadfactor =-1;
protected String route ;
protected int distance = -1;
protected String redirect;
protected String domain;
protected int activationCode = -1;
protected String activation ;
/**
* Return descriptive information about this implementation and the
* corresponding version number, in the format
* <description>/<version>
.
*/
public String getInfo() {
return (info);
}
/**
*
*/
public JkStatusUpdateWorkerTask() {
super();
setUrl("http://localhost/jkstatus");
}
/**
* @return the activation
*/
public String getActivation() {
return activation;
}
/**
* @param activation the activation to set
*/
public void setActivation(String activation) {
this.activation = activation;
}
/**
* @return the activationCode
*/
public int getActivationCode() {
return activationCode;
}
/**
* @param activationCode the activationCode to set
*/
public void setActivationCode(int activationCode) {
this.activationCode = activationCode;
}
/**
* @return the distance
*/
public int getDistance() {
return distance;
}
/**
* @param distance the distance to set
*/
public void setDistance(int distance) {
this.distance = distance;
}
/**
* @return the domain
*/
public String getDomain() {
return domain;
}
/**
* @param domain the domain to set
*/
public void setDomain(String domain) {
this.domain = domain;
}
/**
* @return the loadbalancer
*/
public String getLoadbalancer() {
return loadbalancer;
}
/**
* @param loadbalancer the loadbalaner to set
*/
public void setLoadbalancer(String loadbalancer) {
this.loadbalancer = loadbalancer;
}
/**
* @return the loadfactor
*/
public int getLoadfactor() {
return loadfactor;
}
/**
* @param loadfactor the loadfactor to set
*/
public void setLoadfactor(int loadfactor) {
this.loadfactor = loadfactor;
}
/**
* @return the redirect
*/
public String getRedirect() {
return redirect;
}
/**
* @param redirect the redirect to set
*/
public void setRedirect(String redirect) {
this.redirect = redirect;
}
/**
* @return the route
*/
public String getRoute() {
return route;
}
/**
* @param route the route to set
*/
public void setRoute(String route) {
this.route = route;
}
/**
* @return the worker
*/
public String getWorker() {
return worker;
}
/**
* @param worker the worker to set
*/
public void setWorker(String worker) {
this.worker = worker;
}
/**
* Create JkStatus worker update link
*