annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestCallContext.java @ 1065:cf421645a2d3

Made cache statistics available as MBeans (eg in JConsole). gnv-artifacts/trunk@1157 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 04 Jun 2010 08:47:52 +0000
parents 9d2891068ba5
children f953c9a559d8
rev   line source
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 package de.intevation.gnv.artifacts;
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
3 import de.intevation.artifacts.ArtifactDatabase;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
4 import de.intevation.artifacts.ArtifactFactory;
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5 import de.intevation.artifacts.CallContext;
116
820238357bab Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents: 102
diff changeset
6 import de.intevation.artifacts.CallMeta;
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
7
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
8 /**
780
c4156275c1e1 Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 779
diff changeset
9 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
778
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 485
diff changeset
10 *
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 */
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 public class TestCallContext implements CallContext {
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
14
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
15
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16 private Object globalContext = null;
117
ef157bd2fa92 LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents: 116
diff changeset
17 private CallMeta callMeta = null;
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
18 private ArtifactFactory artifactFactory = null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
19 private ArtifactDatabase artifactDatabase = null;
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20 /**
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21 * Constructor
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22 */
778
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 485
diff changeset
23 public TestCallContext(Object globalContext,
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 485
diff changeset
24 CallMeta callMeta,
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
25 ArtifactFactory artifactFactory) {
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26 this.globalContext = globalContext;
117
ef157bd2fa92 LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents: 116
diff changeset
27 this.callMeta = callMeta;
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
28 this.artifactDatabase = new TestArtifactDatabase(artifactFactory);
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29 }
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
30
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
31 /**
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 * @see de.intevation.artifacts.CallContext#afterBackground(int)
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 */
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 public void afterBackground(int action) {
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 }
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 /**
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38 * @see de.intevation.artifacts.CallContext#afterCall(int)
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39 */
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
40 public void afterCall(int action) {
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 }
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 /**
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 * @see de.intevation.artifacts.CallContext#globalContext()
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45 */
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 public Object globalContext() {
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 return this.globalContext;
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48 }
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49
116
820238357bab Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents: 102
diff changeset
50 public CallMeta getMeta() {
117
ef157bd2fa92 LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents: 116
diff changeset
51 return this.callMeta;
116
820238357bab Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents: 102
diff changeset
52 }
820238357bab Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents: 102
diff changeset
53
306
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
54 public Object getContextValue(Object key) {
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
55 return null;
306
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
56 }
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
57
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
58 public Object putContextValue(Object key, Object value) {
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
59 return null;
306
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
60 }
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
61
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
62 public ArtifactDatabase getDatabase() {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
63 return this.artifactDatabase;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
64 }
797
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
65
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
66 public Long getTimeToLive() {
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
67 throw new UnsupportedOperationException("Not supported yet.");
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
68 }
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
69 }

http://dive4elements.wald.intevation.org