KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jmeter > ejb > jndi > config > LookupConfig


1 // $Header: /home/cvs/jakarta-jmeter/src/protocol/jndi/config/LookupConfig.java,v 1.3 2004/02/13 02:40:54 sebb Exp $
2
/*
3  * Copyright 2001-2004 The Apache Software Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17 */

18
19 package org.apache.jmeter.ejb.jndi.config;
20
21 import java.io.Serializable JavaDoc;
22
23 import org.apache.jmeter.config.AbstractConfigElement;
24 import org.apache.jmeter.config.ConfigElement;
25 import org.apache.jmeter.ejb.jndi.config.gui.LookupConfigGui;
26 import org.apache.jmeter.util.JMeterUtils;
27 import org.apache.log4j.Category;
28
29 /**
30  * Stores the configuration for JNDI lookup
31  *
32  * @author Khor Soon Hin
33  * Created 2001 Dec 19
34  * @version $Revision: 1.3 $ Last Updated: $Date: 2004/02/13 02:40:54 $
35  */

36 public class LookupConfig extends AbstractConfigElement implements Serializable JavaDoc
37 {
38   private static Category catClass = Category.getInstance(
39     LookupConfig.class.getName());
40
41   protected static final String JavaDoc LOOKUP_NAME = "lookup_name";
42
43   public LookupConfig()
44   {
45   }
46
47   public Class JavaDoc getGuiClass()
48   {
49     return org.apache.jmeter.ejb.jndi.config.gui.LookupConfigGui.class;
50   }
51
52   public Object JavaDoc clone()
53   {
54     LookupConfig newConfig = new LookupConfig();
55     configureClone(newConfig);
56     return newConfig;
57   }
58
59   public String JavaDoc getLookupName()
60   {
61     String JavaDoc string = (String JavaDoc)this.getProperty(LOOKUP_NAME);
62     if(catClass.isDebugEnabled())
63     {
64       catClass.debug("getLookupName1 : lookup name - " + string);
65     }
66     return string;
67   }
68
69   public void setLookupName(String JavaDoc string)
70   {
71     if(catClass.isDebugEnabled())
72     {
73       catClass.debug("setLookupName1 : lookup name - " + string);
74     }
75     this.putProperty(LOOKUP_NAME, string);
76   }
77
78   public String JavaDoc getClassLabel()
79   {
80     return JMeterUtils.getResString("jndi_lookup_title");
81   }
82
83   public void addConfigElement(ConfigElement config)
84   {
85   }
86 }
87
Popular Tags