Mercurial > dive4elements > framework
annotate artifacts/src/main/java/de/intevation/artifacts/CallContext.java @ 450:364e3ea0ae11
Added tag 2.9.7 for changeset 708de1779232
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Mon, 17 Dec 2012 17:47:36 +0100 |
parents | 410a1bfb9590 |
children |
rev | line source |
---|---|
100
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
86
diff
changeset
|
1 /* |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
86
diff
changeset
|
2 * Copyright (c) 2010 by Intevation GmbH |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
86
diff
changeset
|
3 * |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
86
diff
changeset
|
4 * This program is free software under the LGPL (>=v2.1) |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
86
diff
changeset
|
5 * Read the file LGPL.txt coming with the software for details |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
86
diff
changeset
|
6 * or visit http://www.gnu.org/licenses/ if it does not exist. |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
86
diff
changeset
|
7 */ |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
86
diff
changeset
|
8 |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 package de.intevation.artifacts; |
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 |
417
410a1bfb9590
Fix for NPE on empty user database
Christian Lins <christian.lins@intevation.de>
parents:
353
diff
changeset
|
11 import java.util.LinkedList; |
353
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
12 import java.util.List; |
331
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
13 |
248
eafe59ecfb7e
Added a setup() method to the CallContext.Listener.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
245
diff
changeset
|
14 import org.w3c.dom.Document; |
eafe59ecfb7e
Added a setup() method to the CallContext.Listener.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
245
diff
changeset
|
15 import org.w3c.dom.Node; |
eafe59ecfb7e
Added a setup() method to the CallContext.Listener.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
245
diff
changeset
|
16 |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
17 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
18 * Instances of this interface are given to feed(), advance(), describe() |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
19 * and out() to enable the artifact to communicate with the runtime system. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
20 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
21 */ |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 public interface CallContext |
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 { |
245
def3daabc5b5
Added a listener to be called if a call context was created and closed
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
100
diff
changeset
|
24 interface Listener { |
248
eafe59ecfb7e
Added a setup() method to the CallContext.Listener.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
245
diff
changeset
|
25 void setup(Document config, Node listenerNode); |
245
def3daabc5b5
Added a listener to be called if a call context was created and closed
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
100
diff
changeset
|
26 void init(CallContext callContext); |
def3daabc5b5
Added a listener to be called if a call context was created and closed
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
100
diff
changeset
|
27 void close(CallContext callContext); |
def3daabc5b5
Added a listener to be called if a call context was created and closed
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
100
diff
changeset
|
28 } |
def3daabc5b5
Added a listener to be called if a call context was created and closed
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
100
diff
changeset
|
29 |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
30 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
31 * Constant to signal that nothing should be done |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
32 * with the artifact after method return. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
33 */ |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 int NOTHING = 0; |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
35 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
36 * Constant to signal that the database timestamp |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
37 * should be updated after method return. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
38 */ |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 int TOUCH = 1; |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
40 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
41 * Constant to signal that the artifact should be stored |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
42 * after method return. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
43 */ |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 int STORE = 2; |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
45 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
46 * Constant to signal that the artifact fork a backgroud thread |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
47 * and should be hold in memory till it signals that it has |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
48 * finished its operation. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
49 */ |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
50 int BACKGROUND = 3; |
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
51 // int DELETE = 4; |
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 // int FOREVER = 5; |
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
54 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
55 * This method may be called from feed(), describe(), advance() |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
56 * and out to signal what should happend with artefact after |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
57 * the current method call returns. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
58 * @param action Valid values are NOTHING, TOUCH, STORE, BACKGROUND. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
59 */ |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 void afterCall(int action); |
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
62 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
63 * When send to background with a afterCall(BACKGROUND) this |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
64 * method is to be called from the background thread to signal |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
65 * that the background operation has ended. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
66 * @param action Same semantics as in afterCall. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
67 */ |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
68 void afterBackground(int action); |
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
69 |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
70 /** |
330
3168af23aec5
Added a CallContext.isInBackground() method to determine if an Artifact or a Collection has started a background thread and is currently locked.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
248
diff
changeset
|
71 * Returns true, if the object forked a background thread and has not |
3168af23aec5
Added a CallContext.isInBackground() method to determine if an Artifact or a Collection has started a background thread and is currently locked.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
248
diff
changeset
|
72 * finished it yet. |
3168af23aec5
Added a CallContext.isInBackground() method to determine if an Artifact or a Collection has started a background thread and is currently locked.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
248
diff
changeset
|
73 */ |
3168af23aec5
Added a CallContext.isInBackground() method to determine if an Artifact or a Collection has started a background thread and is currently locked.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
248
diff
changeset
|
74 boolean isInBackground(); |
3168af23aec5
Added a CallContext.isInBackground() method to determine if an Artifact or a Collection has started a background thread and is currently locked.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
248
diff
changeset
|
75 |
3168af23aec5
Added a CallContext.isInBackground() method to determine if an Artifact or a Collection has started a background thread and is currently locked.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
248
diff
changeset
|
76 /** |
331
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
77 * Adds a background message for the current Artifact or Collection. |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
78 * |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
79 * @param msg The message. |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
80 */ |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
81 void addBackgroundMessage(Message msg); |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
82 |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
83 /** |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
84 * Returns the background messages of the current Artifact or Collection. |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
85 * |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
86 * @return the list of background messages. |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
87 */ |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
88 LinkedList<Message> getBackgroundMessages(); |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
89 |
089c6f7794b5
Integrated a messaging system for Artifacts and Collections that started background threads.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
330
diff
changeset
|
90 /** |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
91 * Access to the global context of the runtime system. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
92 * @return The global context. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
93 */ |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 Object globalContext(); |
48
41c225c8bd41
Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
95 |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
96 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
97 * Access to the artifact database itself. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
98 * @return The database. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
99 */ |
66
89e3de0ee05f
Implemented some methods to get access to ArtifactFactories which are stored in the ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
58
diff
changeset
|
100 ArtifactDatabase getDatabase(); |
89e3de0ee05f
Implemented some methods to get access to ArtifactFactories which are stored in the ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
58
diff
changeset
|
101 |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
102 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
103 * The meta data of the current call. Used to transport |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
104 * language preferences of the callee e.g. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
105 * @return The meta information of this call. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
106 */ |
48
41c225c8bd41
Add i18n support via "Accept-Language" HTTP headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
32
diff
changeset
|
107 CallMeta getMeta(); |
86
b2e0cb83631c
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
85
diff
changeset
|
108 |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
109 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
110 * Each call context has a clipboard. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
111 * getContextValue is used to fetch data from this board. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
112 * @param key Key of the requested item. |
417
410a1bfb9590
Fix for NPE on empty user database
Christian Lins <christian.lins@intevation.de>
parents:
353
diff
changeset
|
113 * @return The value stored for the specified value, null if |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
114 * no item with this key exists. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
115 */ |
58
39fec7d714dc
Added a real artifact proxy class to be more flexible with artifact replacements
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
48
diff
changeset
|
116 Object getContextValue(Object key); |
39fec7d714dc
Added a real artifact proxy class to be more flexible with artifact replacements
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
48
diff
changeset
|
117 |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
118 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
119 * Each call context has a clipboard. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
120 * putContextValue is used to store a key/value pair onto this board. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
121 * @param key The key of the pair |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
122 * @param value The value of the pair. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
123 * @return The formerly stored value under the given key. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
66
diff
changeset
|
124 */ |
58
39fec7d714dc
Added a real artifact proxy class to be more flexible with artifact replacements
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
48
diff
changeset
|
125 Object putContextValue(Object key, Object value); |
84
72e2dd4feb31
Added the time to live of an artifact to the CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
126 |
72e2dd4feb31
Added the time to live of an artifact to the CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
127 /** |
72e2dd4feb31
Added the time to live of an artifact to the CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
128 * Returns the time to live of the current artifact. |
72e2dd4feb31
Added the time to live of an artifact to the CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
129 * @return The time to live of the current artifact. |
72e2dd4feb31
Added the time to live of an artifact to the CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
130 */ |
72e2dd4feb31
Added the time to live of an artifact to the CallContext.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
131 Long getTimeToLive(); |
353
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
132 |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
133 /** |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
134 * Get a list of DataProvider that get provide 'key' type of data to |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
135 * other facets. |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
136 */ |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
137 public List<DataProvider> getDataProvider(Object key); |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
138 |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
139 /** |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
140 * Register a DataProvider that can provide 'key' type of data to |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
141 * other facets. |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
142 */ |
33d7a6da1a05
Extended CallContext to also act as a blackboard/service broker.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
331
diff
changeset
|
143 public Object registerDataProvider(Object key, DataProvider provider); |
32
c2d53bd30ab8
Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
144 } |
85
78263e910675
Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
84
diff
changeset
|
145 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |