001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 2006 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id:Worker.java 8660 2006-06-20 08:15:28Z danesa $
023: * --------------------------------------------------------------------------
024: */package org.objectweb.jonas.management.cluster;
025:
026: import org.objectweb.jonas.management.monitoring.ServerProxy;
027:
028: /**
029: * JkCluster members are actually workers.
030: * A worker represents a JOnAS server which plays the role of worker in a
031: * Mod_jk loadbalancing cluster.
032: * @author Adriana Danes
033: */
034: public class JkClusterMember extends ClusterMember implements
035: JkClusterMemberMBean {
036:
037: /**
038: * The worker's host
039: */
040: private String host = null;
041:
042: /**
043: * The worker's port
044: */
045: private int port;
046:
047: /**
048: * The worker's load balance factor
049: */
050: private int lbFactor;
051:
052: /**
053: * worker type
054: */
055: private String type;
056:
057: /**
058: * load balancing factor, as defined in workers.properties
059: */
060: private int lbfactor;
061:
062: /**
063: * Constructor
064: * @param name the worker name as defined in worker.properties
065: * @param proxy related Server Proxy
066: */
067: public JkClusterMember(String name, ServerProxy proxy) {
068: super (name, proxy);
069: }
070:
071: public String getHost() {
072: return host;
073: }
074:
075: public void setHost(String host) {
076: this .host = host;
077: }
078:
079: public int getLbfactor() {
080: return lbfactor;
081: }
082:
083: public void setLbfactor(int lbfactor) {
084: this .lbfactor = lbfactor;
085: }
086:
087: public int getPort() {
088: return port;
089: }
090:
091: public void setPort(int port) {
092: this .port = port;
093: }
094:
095: public void setName(String name) {
096: this .name = name;
097: }
098:
099: public String getType() {
100: return type;
101: }
102:
103: public void setType(String type) {
104: this .type = type;
105: }
106:
107: public int getLbFactor() {
108: return lbFactor;
109: }
110:
111: public void setLbFactor(int lbFactor) {
112: this.lbFactor = lbFactor;
113: }
114: }
|