]> SALOME platform Git repositories - tools/siman.git/blob - Workspace/3dparty_src/spring/schema/spring-task-3.0.xsd
Salome HOME
7e484d0d013de815c89100e491357364ecfefe2b
[tools/siman.git] / Workspace / 3dparty_src / spring / schema / spring-task-3.0.xsd
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
3 <xsd:schema xmlns="http://www.springframework.org/schema/task"
4                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5                 xmlns:beans="http://www.springframework.org/schema/beans"
6                 xmlns:tool="http://www.springframework.org/schema/tool"
7                 targetNamespace="http://www.springframework.org/schema/task"
8                 elementFormDefault="qualified"
9                 attributeFormDefault="unqualified">
10
11         <xsd:annotation>
12                 <xsd:documentation><![CDATA[
13         Defines the elements used in the Spring Framework's support for task execution and scheduling.
14                 ]]></xsd:documentation>
15         </xsd:annotation>
16
17         <xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"/>
18         <xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.0.xsd"/>
19
20         <xsd:element name="annotation-driven">
21                 <xsd:annotation>
22                         <xsd:documentation><![CDATA[
23         Enables the detection of @Async and @Scheduled annotations on any Spring-managed object. If present,
24         a proxy will be generated for executing the annotated methods asynchronously.
25                         ]]></xsd:documentation>
26                 </xsd:annotation>
27                 <xsd:complexType>
28                         <xsd:attribute name="executor" type="xsd:string" use="optional">
29                                 <xsd:annotation>
30                                         <xsd:documentation><![CDATA[
31         Specifies the java.util.Executor instance to use when invoking asynchronous methods.
32         If not provided, an instance of org.springframework.core.task.SimpleAsyncTaskExecutor
33         will be used by default.
34                                         ]]></xsd:documentation>
35                                 </xsd:annotation>
36                         </xsd:attribute>
37                         <xsd:attribute name="scheduler" type="xsd:string" use="optional">
38                                 <xsd:annotation>
39                                         <xsd:documentation><![CDATA[
40         Specifies the org.springframework.scheduling.TaskScheduler or
41         java.util.ScheduledExecutorService instance to use when invoking scheduled
42         methods. If no reference is provided, a TaskScheduler backed by a single
43         thread scheduled executor will be used.
44                                         ]]></xsd:documentation>
45                                 </xsd:annotation>
46                         </xsd:attribute>
47                         <xsd:attribute name="mode" default="proxy">
48                                 <xsd:annotation>
49                                         <xsd:documentation><![CDATA[
50         Should annotated beans be proxied using Spring's AOP framework,
51         or should they rather be weaved with an AspectJ async execution aspect?
52
53         AspectJ weaving requires spring-aspects.jar on the classpath,
54         as well as load-time weaving (or compile-time weaving) enabled.
55
56         Note: The weaving-based aspect requires the @Async annotation to be
57         defined on the concrete class. Annotations in interfaces will not work
58         in that case (they will rather only work with interface-based proxies)!
59                                         ]]></xsd:documentation>
60                                 </xsd:annotation>
61                                 <xsd:simpleType>
62                                         <xsd:restriction base="xsd:string">
63                                                 <xsd:enumeration value="proxy"/>
64                                                 <xsd:enumeration value="aspectj"/>
65                                         </xsd:restriction>
66                                 </xsd:simpleType>
67                         </xsd:attribute>
68                         <xsd:attribute name="proxy-target-class" type="xsd:boolean" default="false">
69                                 <xsd:annotation>
70                                         <xsd:documentation><![CDATA[
71         Are class-based (CGLIB) proxies to be created? By default, standard
72         Java interface-based proxies are created.
73
74         Note: Class-based proxies require the @Async annotation to be defined
75         on the concrete class. Annotations in interfaces will not work in
76         that case (they will rather only work with interface-based proxies)!
77                                         ]]></xsd:documentation>
78                                 </xsd:annotation>
79                         </xsd:attribute>
80                 </xsd:complexType>
81         </xsd:element>
82
83         <xsd:element name="scheduler">
84                 <xsd:annotation>
85                         <xsd:documentation><![CDATA[
86         Defines a ThreadPoolTaskScheduler instance with configurable pool size.
87                         ]]></xsd:documentation>
88                 </xsd:annotation>
89                 <xsd:complexType>
90                         <xsd:attribute name="id" type="xsd:string" use="required">
91                                 <xsd:annotation>
92                                         <xsd:documentation><![CDATA[
93         The bean name for the generated ThreadPoolTaskScheduler instance.
94         It will also be used as the default thread name prefix.
95                                         ]]></xsd:documentation>
96                                 </xsd:annotation>
97                         </xsd:attribute>
98                         <xsd:attribute name="pool-size" type="xsd:string" use="optional">
99                                 <xsd:annotation>
100                                         <xsd:documentation><![CDATA[
101         The size of the ScheduledExecutorService's thread pool. The default is 1.
102                                         ]]></xsd:documentation>
103                                 </xsd:annotation>
104                         </xsd:attribute>
105                 </xsd:complexType>
106         </xsd:element>
107
108         <xsd:element name="executor">
109                 <xsd:annotation>
110                         <xsd:documentation><![CDATA[
111         Defines a ThreadPoolTaskExecutor instance with configurable pool size,
112         queue-capacity, keep-alive, and rejection-policy values.
113                         ]]></xsd:documentation>
114                 </xsd:annotation>
115                 <xsd:complexType>
116                         <xsd:attribute name="id" type="xsd:string" use="required">
117                                 <xsd:annotation>
118                                         <xsd:documentation><![CDATA[
119         The bean name for the generated ThreadPoolTaskExecutor instance.
120         This value will also be used as the thread name prefix which is why it is
121         required even when defining the executor as an inner bean: The executor
122         won't be directly accessible then but will nevertheless use the specified
123         id as the thread name prefix of the threads that it manages.
124                                         ]]></xsd:documentation>
125                                 </xsd:annotation>
126                         </xsd:attribute>
127                         <xsd:attribute name="pool-size" type="xsd:string" use="optional">
128                                 <xsd:annotation>
129                                         <xsd:documentation><![CDATA[
130         The size of the executor's thread pool as either a single value or a range
131         (e.g. 5-10). If no bounded queue-capacity value is provided, then a max value
132         has no effect unless the range is specified as 0-n. In that case, the core pool
133         will have a size of n, but the 'allowCoreThreadTimeout' flag will be set to true.
134         If a queue-capacity is provided, then the lower bound of a range will map to the
135         core size and the upper bound will map to the max size. If this attribute is not
136         provided, the default core size will be 1, and the default max size will be
137         Integer.MAX_VALUE (i.e. unbounded).
138                                         ]]></xsd:documentation>
139                                 </xsd:annotation>
140                         </xsd:attribute>
141                         <xsd:attribute name="queue-capacity" type="xsd:string" use="optional">
142                                 <xsd:annotation>
143                                         <xsd:documentation><![CDATA[
144         Queue capacity for the ThreadPoolTaskExecutor. If not specified, the default will
145         be Integer.MAX_VALUE (i.e. unbounded).
146                                         ]]></xsd:documentation>
147                                 </xsd:annotation>
148                         </xsd:attribute>
149                         <xsd:attribute name="keep-alive" type="xsd:string" use="optional">
150                                 <xsd:annotation>
151                                         <xsd:documentation><![CDATA[
152         Keep-alive time in seconds. Inactive threads that have been created beyond the
153         core size will timeout after the specified number of seconds elapse. If the
154         executor has an unbounded queue capacity and a size range represented as 0-n,
155         then the core threads will also be configured to timeout when inactive.
156         Otherwise, core threads will not ever timeout.
157                                         ]]></xsd:documentation>
158                                 </xsd:annotation>
159                         </xsd:attribute>
160                         <xsd:attribute name="rejection-policy" use="optional">
161                                 <xsd:annotation>
162                                         <xsd:documentation><![CDATA[
163         The RejectedExecutionHandler type. When a bounded queue cannot accept any
164         additional tasks, this determines the behavior. While the default is ABORT,
165         consider using CALLER_RUNS to throttle inbound tasks. In other words, by forcing
166         the caller to run the task itself, it will not be able to provide another task
167         until after it completes the task at hand. In the meantime, one or more tasks
168         may be removed from the queue. Alternatively, if it is not critical to run every
169         task, consider using DISCARD to drop the current task or DISCARD_OLDEST to drop
170         the task at the head of the queue.
171                                         ]]></xsd:documentation>
172                                 </xsd:annotation>
173                                 <xsd:simpleType>
174                                         <xsd:restriction base="xsd:string">
175                                                 <xsd:enumeration value="ABORT"/>
176                                                 <xsd:enumeration value="CALLER_RUNS"/>
177                                                 <xsd:enumeration value="DISCARD"/>
178                                                 <xsd:enumeration value="DISCARD_OLDEST"/>
179                                         </xsd:restriction>
180                                 </xsd:simpleType>
181                         </xsd:attribute>
182                 </xsd:complexType>
183         </xsd:element>
184
185         <xsd:element name="scheduled-tasks">
186                 <xsd:annotation>
187                         <xsd:documentation><![CDATA[
188         Top-level element that contains one or more task sub-elements to be
189         managed by a given TaskScheduler.
190                         ]]></xsd:documentation>
191                 </xsd:annotation>
192                 <xsd:complexType>
193                         <xsd:sequence>
194                                 <xsd:element name="scheduled" type="scheduledTaskType" minOccurs="1" maxOccurs="unbounded"/>
195                         </xsd:sequence>
196                         <xsd:attribute name="scheduler" type="xsd:string" use="optional">
197                                 <xsd:annotation>
198                                         <xsd:documentation><![CDATA[
199         Reference to an instance of TaskScheduler to manage the provided tasks. If not specified,
200         the default value will be a wrapper for a single-threaded Executor.
201                                         ]]></xsd:documentation>
202                                         <xsd:appinfo>
203                                                 <tool:annotation kind="ref">
204                                                         <tool:expected-type type="org.springframework.scheduling.TaskScheduler"/>
205                                                 </tool:annotation>
206                                         </xsd:appinfo>
207                                 </xsd:annotation>
208                         </xsd:attribute>
209                 </xsd:complexType>
210         </xsd:element>
211
212         <xsd:complexType name="scheduledTaskType">
213                 <xsd:annotation>
214                         <xsd:documentation><![CDATA[
215         Element defining a scheduled method-invoking task and its corresponding trigger.
216                         ]]></xsd:documentation>
217                 </xsd:annotation>
218                 <xsd:attribute name="cron" type="xsd:string" use="optional">
219                         <xsd:annotation>
220                                 <xsd:documentation><![CDATA[
221         A cron-based trigger. See the org.springframework.scheduling.support.CronSequenceGenerator
222         JavaDoc for example patterns.
223                                 ]]></xsd:documentation>
224                         </xsd:annotation>
225                 </xsd:attribute>
226                 <xsd:attribute name="fixed-delay" type="xsd:string" use="optional">
227                         <xsd:annotation>
228                                 <xsd:documentation><![CDATA[
229         An interval-based trigger where the interval is measured from the completion time of the
230         previous task. The time unit value is measured in milliseconds.
231                                 ]]></xsd:documentation>
232                         </xsd:annotation>
233                 </xsd:attribute>
234                 <xsd:attribute name="fixed-rate" type="xsd:string" use="optional">
235                         <xsd:annotation>
236                                 <xsd:documentation><![CDATA[
237         An interval-based trigger where the interval is measured from the start time of the
238         previous task. The time unit value is measured in milliseconds.
239                                 ]]></xsd:documentation>
240                         </xsd:annotation>
241                 </xsd:attribute>
242                 <xsd:attribute name="ref" type="xsd:string" use="required">
243                         <xsd:annotation>
244                                 <xsd:documentation><![CDATA[
245         Reference to an object that provides a method to be invoked.
246                                 ]]></xsd:documentation>
247                                 <xsd:appinfo>
248                                         <tool:annotation kind="ref" />
249                                 </xsd:appinfo>
250                         </xsd:annotation>
251                 </xsd:attribute>
252                 <xsd:attribute name="method" type="xsd:string" use="required">
253                         <xsd:annotation>
254                                 <xsd:documentation><![CDATA[
255         The name of the method to be invoked.
256                                 ]]></xsd:documentation>
257                                 <xsd:appinfo>
258                                         <tool:annotation>
259                                                 <tool:expected-method type-ref="@ref"/>
260                                         </tool:annotation>
261                                 </xsd:appinfo>
262                         </xsd:annotation>
263                 </xsd:attribute>
264         </xsd:complexType>
265
266 </xsd:schema>