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