001: /*
002: * soapUI, copyright (C) 2004-2007 eviware.com
003: *
004: * soapUI is free software; you can redistribute it and/or modify it under the
005: * terms of version 2.1 of the GNU Lesser General Public License as published by
006: * the Free Software Foundation.
007: *
008: * soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
009: * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
010: * See the GNU Lesser General Public License for more details at gnu.org.
011: */
012:
013: package com.eviware.soapui.impl.wsdl.loadtest.strategy;
014:
015: import java.beans.PropertyChangeListener;
016: import java.beans.PropertyChangeSupport;
017:
018: import javax.swing.JComponent;
019:
020: import org.apache.xmlbeans.XmlObject;
021:
022: import com.eviware.soapui.model.testsuite.LoadTestRunContext;
023: import com.eviware.soapui.model.testsuite.LoadTestRunner;
024: import com.eviware.soapui.model.testsuite.TestRunContext;
025: import com.eviware.soapui.model.testsuite.TestRunner;
026: import com.eviware.soapui.model.testsuite.TestStep;
027: import com.eviware.soapui.model.testsuite.TestStepResult;
028:
029: /**
030: * LoadStrategy allowing maximum runs and request delays
031: *
032: * @author Ole.Matzura
033: */
034:
035: public abstract class AbstractLoadStrategy implements LoadStrategy {
036: private PropertyChangeSupport propertyChangeSupport;
037: private final String type;
038:
039: public AbstractLoadStrategy(String type) {
040: this .type = type;
041: propertyChangeSupport = new PropertyChangeSupport(this );
042: }
043:
044: public XmlObject getConfig() {
045: return null;
046: }
047:
048: public JComponent getConfigurationPanel() {
049: return null;
050: }
051:
052: public String getType() {
053: return type;
054: }
055:
056: public void addConfigurationChangeListener(
057: PropertyChangeListener listener) {
058: propertyChangeSupport.addPropertyChangeListener(
059: CONFIGURATION_PROPERTY, listener);
060: }
061:
062: public void removeConfigurationChangeListener(
063: PropertyChangeListener listener) {
064: propertyChangeSupport.removePropertyChangeListener(
065: CONFIGURATION_PROPERTY, listener);
066: }
067:
068: public void notifyConfigurationChanged() {
069: propertyChangeSupport.firePropertyChange(
070: CONFIGURATION_PROPERTY, null, null);
071: }
072:
073: public boolean allowThreadCountChangeDuringRun() {
074: return true;
075: }
076:
077: public void afterLoadTest(LoadTestRunner loadTestRunner,
078: LoadTestRunContext context) {
079: }
080:
081: public void afterTestCase(LoadTestRunner loadTestRunner,
082: LoadTestRunContext context, TestRunner testRunner,
083: TestRunContext runContext) {
084: }
085:
086: public void afterTestStep(LoadTestRunner loadTestRunner,
087: LoadTestRunContext context, TestRunner testRunner,
088: TestRunContext runContext, TestStepResult testStepResult) {
089: }
090:
091: public void beforeLoadTest(LoadTestRunner loadTestRunner,
092: LoadTestRunContext context) {
093: }
094:
095: public void beforeTestCase(LoadTestRunner loadTestRunner,
096: LoadTestRunContext context, TestRunner testRunner,
097: TestRunContext runContext) {
098: }
099:
100: public void beforeTestStep(LoadTestRunner loadTestRunner,
101: LoadTestRunContext context, TestRunner testRunner,
102: TestRunContext runContext, TestStep testStep) {
103: }
104:
105: public void loadTestStarted(LoadTestRunner loadTestRunner,
106: LoadTestRunContext context) {
107: }
108:
109: public void loadTestStopped(LoadTestRunner loadTestRunner,
110: LoadTestRunContext context) {
111: }
112:
113: public void updateConfig(XmlObject config) {
114: }
115: }
|