001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 2006 Bull S.A.S.
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: Cluster.java 9523 2006-09-05 15:55:34Z pelletib $
023: * --------------------------------------------------------------------------
024: */package org.objectweb.jonas.ant.jonasbase.web;
025:
026: /**
027: * Support for HTTP Session Clustering. Tomcat only.
028: *
029: * @author Guillaume Sauthier
030: */
031: public class Cluster {
032:
033: /**
034: * Default MultiCast Host for HTTP Session Clustering.
035: */
036: public static final String DEFAULT_MCAST_ADDR = "228.0.0.4";
037:
038: /**
039: * Default MultiCast Port for HTTP Session Clustering.
040: */
041: public static final String DEFAULT_MCAST_PORT = "45564";
042:
043: /**
044: * Default listening port for HTTP Session Clustering.
045: */
046: public static final String DEFAULT_LISTEN_PORT = "4001";
047:
048: /**
049: * Default cluster name
050: */
051: public static final String DEFAULT_CLUSTER_NAME = "myTomcatCluster";
052:
053: /**
054: * User specified Cluster listening port.
055: */
056: private String listenPort = DEFAULT_LISTEN_PORT;
057:
058: /**
059: * User specified MultiCast port.
060: */
061: private String mcastPort = DEFAULT_MCAST_PORT;
062:
063: /**
064: * User specified MultiCast address.
065: */
066: private String mcastAddr = DEFAULT_MCAST_ADDR;
067:
068: /**
069: * Cluster name
070: */
071: private String name = DEFAULT_CLUSTER_NAME;
072:
073: /**
074: * @return Returns the name.
075: */
076: public String getName() {
077: return name;
078: }
079:
080: /**
081: * @param name The cluster name.
082: */
083: public void setName(String name) {
084: this .name = name;
085: }
086:
087: /**
088: * @return Returns the listenPort.
089: */
090: public String getListenPort() {
091: return listenPort;
092: }
093:
094: /**
095: * @param listenPort The listenPort to set.
096: */
097: public void setListenPort(String listenPort) {
098: this .listenPort = listenPort;
099: }
100:
101: /**
102: * @return Returns the mcastAddr.
103: */
104: public String getMcastAddr() {
105: return mcastAddr;
106: }
107:
108: /**
109: * @param mcastAddr The mcastAddr to set.
110: */
111: public void setMcastAddr(String mcastAddr) {
112: this .mcastAddr = mcastAddr;
113: }
114:
115: /**
116: * @return Returns the mcastPort.
117: */
118: public String getMcastPort() {
119: return mcastPort;
120: }
121:
122: /**
123: * @param mcastPort The mcastPort to set.
124: */
125: public void setMcastPort(String mcastPort) {
126: this.mcastPort = mcastPort;
127: }
128:
129: }
|