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;
014:
015: import java.util.Collection;
016: import java.util.Collections;
017: import java.util.HashMap;
018: import java.util.Map;
019: import java.util.Set;
020:
021: import com.eviware.soapui.model.testsuite.LoadTestRunContext;
022: import com.eviware.soapui.model.testsuite.LoadTestRunner;
023:
024: /**
025: * LoadTestRunContext implementation for WsdlLoadTests
026: *
027: * @author Ole.Matzura
028: */
029:
030: public class WsdlLoadTestContext implements LoadTestRunContext,
031: Map<String, Object> {
032: private Map<String, Object> properties = Collections
033: .synchronizedMap(new HashMap<String, Object>());
034: private final WsdlLoadTestRunner runner;
035:
036: public WsdlLoadTestContext(WsdlLoadTestRunner runner) {
037: this .runner = runner;
038: }
039:
040: public Object getProperty(String name) {
041: return properties.get(name);
042: }
043:
044: public void setProperty(String name, Object value) {
045: properties.put(name, value);
046: }
047:
048: public Map getProperties() {
049: return properties;
050: }
051:
052: public boolean hasProperty(String name) {
053: return properties.containsKey(name);
054: }
055:
056: public LoadTestRunner getLoadTestRunner() {
057: return runner;
058: }
059:
060: public void clear() {
061: properties.clear();
062: }
063:
064: public boolean containsKey(Object arg0) {
065: return properties.containsKey(arg0);
066: }
067:
068: public boolean containsValue(Object arg0) {
069: return properties.containsValue(arg0);
070: }
071:
072: public Set<Entry<String, Object>> entrySet() {
073: return properties.entrySet();
074: }
075:
076: public boolean equals(Object arg0) {
077: return properties.equals(arg0);
078: }
079:
080: public Object get(Object arg0) {
081: return properties.get(arg0);
082: }
083:
084: public int hashCode() {
085: return properties.hashCode();
086: }
087:
088: public boolean isEmpty() {
089: return properties.isEmpty();
090: }
091:
092: public Set<String> keySet() {
093: return properties.keySet();
094: }
095:
096: public Object put(String arg0, Object arg1) {
097: return properties.put(arg0, arg1);
098: }
099:
100: public void putAll(Map<? extends String, ? extends Object> arg0) {
101: properties.putAll(arg0);
102: }
103:
104: public Object remove(Object arg0) {
105: return properties.remove(arg0);
106: }
107:
108: public int size() {
109: return properties.size();
110: }
111:
112: public Collection<Object> values() {
113: return properties.values();
114: }
115:
116: }
|