KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > config > LBConfig


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23  
24 /*
25  * $Header: /cvs/glassfish/admin-core/mbeanapi/src/java/com/sun/appserv/management/config/LBConfig.java,v 1.12 2005/12/25 03:49:41 tcfujii Exp $
26  * $Revision: 1.12 $
27  * $Date: 2005/12/25 03:49:41 $
28  */

29
30 package com.sun.appserv.management.config;
31
32 import java.util.Map JavaDoc;
33 import java.util.Date JavaDoc;
34
35 import com.sun.appserv.management.base.XTypes;
36 import com.sun.appserv.management.base.Container;
37
38 /**
39    Configuration for the lb-config element.
40    @see com.sun.appserv.management.ext.lb.LoadBalancer
41  */

42 public interface LBConfig extends
43     AMXConfig, PropertiesAccess, NamedConfigElement,
44         ServerRefConfigCR, ClusterRefConfigCR, Container {
45     
46     /** The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}. */
47     public static final String JavaDoc J2EE_TYPE = XTypes.LB_CONFIG;
48
49     /**
50       Returns the period, in seconds, within which a server must return a response
51       or otherwise it will be considered unhealthy. Must be greater than or
52       equal to 0.
53      */

54     public String JavaDoc getResponseTimeoutInSeconds();
55
56     /**
57       Set the period, in seconds, within which a server must return a response or
58       otherwise it will be considered unhealthy. Default value is 60 seconds.
59       Must be greater than or equal to 0. A value of 0 effectively turns off
60       this check functionality, meaning the server will always be considered healthy.
61      */

62     public void setResponseTimeoutInSeconds(final String JavaDoc responseTimeoutInSeconds);
63
64     /**
65       Returns a boolean flag indicating how load-balancer will route HTTPS
66       requests. If true, then an HTTPS request to the load-balancer will
67       result in an HTTPS request to the server; if false, then HTTPS requests
68       to the load-balancer result in HTTP requests to the server.
69      */

70     public boolean getHttpsRouting();
71
72     /**
73       Set the boolean flag indicating how load-balancer will route HTTPS
74       requests. If true, then an HTTPS request to the load-balancer will
75       result in an HTTPS request to the server; if false, then HTTPS requests
76       to the load-balancer result in HTTP requests to the server.
77       Default is to use HTTP (i.e. value of false);
78      */

79     public void setHttpsRouting(final boolean value);
80     
81     /**
82       Returns the maximum period, in seconds, that a change to the load
83       balancer configuration file takes before it is detected by
84       the load balancer and the file reloaded. A value of 0
85       indicates that reloading is disabled.
86      */

87     public String JavaDoc getReloadPollIntervalInSeconds();
88
89     /**
90       Set the maximum period, in seconds, that a change to the load balancer
91       configuration file takes before it is detected by the load balancer and
92       the file reloaded. A value of 0 indicates that reloading is disabled.
93       Default period is 1 minute (60 seconds)
94      */

95     public void setReloadPollIntervalInSeconds(final String JavaDoc reloadPollIntervalInSeconds);
96
97     /**
98       Returns the boolean flag that determines whether monitoring is switched
99       on or not. Default is that monitoring is switched off (false)
100      */

101     public boolean getMonitoringEnabled();
102
103     /**
104       Set the boolean flag that determines whether monitoring is switched
105       on or not. Default is that monitoring is switched off (false)
106      */

107     public void setMonitoringEnabled(final boolean value);
108    
109     /**
110       Returns the boolean flag that determines whether a route cookie is or is
111       not enabled.
112      */

113     public boolean getRouteCookieEnabled();
114
115     /**
116       Set the boolean flag that determines whether a route cookie is or is
117       not enabled. Default is enabled (true).
118      */

119     public void setRouteCookieEnabled(final boolean value);
120     
121     /**
122       Calls Container.getContaineeMap(XTypes.CLUSTER_REF_CONFIG ).
123       @return Map of ClusterRefConfig MBean proxies, keyed by name.
124       @see com.sun.appserv.management.base.Container#getContaineeMap
125      */

126     public Map JavaDoc<String JavaDoc,ClusterRefConfig> getClusterRefConfigMap();
127
128     /**
129       Calls Container.getContaineeMap(XTypes.SERVER_REF_CONFIG ).
130       @return Map of ServerRefConfig MBean proxies, keyed by name.
131       @see com.sun.appserv.management.base.Container#getContaineeMap
132      */

133     public Map JavaDoc<String JavaDoc,ServerRefConfig> getServerRefConfigMap();
134 }
135
Popular Tags