Source Code Cross Referenced for JavaConfig.java in  » Testing » jakarta-jmeter » org » apache » jmeter » protocol » java » config » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » jakarta jmeter » org.apache.jmeter.protocol.java.config 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *   http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         * 
017:         */
018:
019:        package org.apache.jmeter.protocol.java.config;
020:
021:        import java.io.Serializable;
022:
023:        import org.apache.jmeter.config.Arguments;
024:        import org.apache.jmeter.config.ConfigTestElement;
025:        import org.apache.jmeter.protocol.java.sampler.JavaSampler;
026:        import org.apache.jmeter.testelement.property.TestElementProperty;
027:
028:        /**
029:         * The <code>JavaConfig</code> class contains the configuration data necessary
030:         * for the Java protocol. This data is used to configure a
031:         * {@link org.apache.jmeter.protocol.java.sampler.JavaSamplerClient} instance to
032:         * perform performance test samples.
033:         * 
034:         * @author Brad Kiewel
035:         * @author <a href="mailto:jeremy_a@bigfoot.com">Jeremy Arnold</a>
036:         * @version $Revision: 493789 $
037:         */
038:        public class JavaConfig extends ConfigTestElement implements 
039:                Serializable {
040:
041:            /**
042:             * Constructor for the JavaConfig object
043:             */
044:            public JavaConfig() {
045:                setArguments(new Arguments());
046:            }
047:
048:            /**
049:             * Sets the class name attribute of the JavaConfig object. This is the class
050:             * name of the
051:             * {@link org.apache.jmeter.protocol.java.sampler.JavaSamplerClient}
052:             * implementation which will be used to execute the test.
053:             * 
054:             * @param classname
055:             *            the new classname value
056:             */
057:            public void setClassname(String classname) {
058:                setProperty(JavaSampler.CLASSNAME, classname);
059:            }
060:
061:            /**
062:             * Gets the class name attribute of the JavaConfig object. This is the class
063:             * name of the
064:             * {@link org.apache.jmeter.protocol.java.sampler.JavaSamplerClient}
065:             * implementation which will be used to execute the test.
066:             * 
067:             * @return the classname value
068:             */
069:            public String getClassname() {
070:                return getPropertyAsString(JavaSampler.CLASSNAME);
071:            }
072:
073:            /**
074:             * Adds an argument to the list of arguments for this JavaConfig object. The
075:             * {@link org.apache.jmeter.protocol.java.sampler.JavaSamplerClient}
076:             * implementation can access these arguments through the
077:             * {@link org.apache.jmeter.protocol.java.sampler.JavaSamplerContext}.
078:             * 
079:             * @param name
080:             *            the name of the argument to be added
081:             * @param value
082:             *            the value of the argument to be added
083:             */
084:            public void addArgument(String name, String value) {
085:                Arguments args = this .getArguments();
086:                args.addArgument(name, value);
087:            }
088:
089:            /**
090:             * Removes all of the arguments associated with this JavaConfig object.
091:             */
092:            public void removeArguments() {
093:                setProperty(new TestElementProperty(JavaSampler.ARGUMENTS,
094:                        new Arguments()));
095:            }
096:
097:            /**
098:             * Set all of the arguments for this JavaConfig object. This will replace
099:             * any previously added arguments. The
100:             * {@link org.apache.jmeter.protocol.java.sampler.JavaSamplerClient}
101:             * implementation can access these arguments through the
102:             * {@link org.apache.jmeter.protocol.java.sampler.JavaSamplerContext}.
103:             * 
104:             * @param args
105:             *            the new arguments
106:             */
107:            public void setArguments(Arguments args) {
108:                setProperty(new TestElementProperty(JavaSampler.ARGUMENTS, args));
109:            }
110:
111:            /**
112:             * Gets the arguments for this JavaConfig object. The
113:             * {@link org.apache.jmeter.protocol.java.sampler.JavaSamplerClient}
114:             * implementation can access these arguments through the
115:             * {@link org.apache.jmeter.protocol.java.sampler.JavaSamplerContext}.
116:             * 
117:             * @return the arguments
118:             */
119:            public Arguments getArguments() {
120:                return (Arguments) getProperty(JavaSampler.ARGUMENTS)
121:                        .getObjectValue();
122:            }
123:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.