A. Getting started
Conclusion
This tutorial has been done on a very simple example of a UWService. Obviously this UWS library offers more functionalities (like adding/changing/removing actions to your UWS). To know more about them see the parts C. How to customize a Job ? and D. How to customize a UWS ?. However among this example you have learnt to use basically this UWS library, and...
...here are the most important things you should now know:
What you have to do ?
- CHOOSE THE TYPE OF UWS
- WRITE THE SERVLET
- DEFINE THE JOB(S) TO USE
The UWS
- 1 abstract class: AbstractUWS
-
4 sub-classes:
- BasicUWS
- QueuedBasicUWS
- ExtendedUWS
- QueuedExtendedUWS
How to choose the type of UWS ?
- To manage different kinds of job:
- ExtendedUWS
- QueuedExtendedUWS
- To have an execution queue:
- QueuedBasicUWS
- QueuedExtendedUWS
The Servlet
- Implemented by a HttpServlet
- service(...) must forward all requests to executeRequest(...) of the UWS
Servlet Template
The Job
- Extension of AbstractJob
- A constructor with only one Map is required
- additionalParams() let's managing more parameters
- jobWork() represents the task of the job
IMPORTANT !
In jobWork() it is your responsibility to:
- check whether the task has been interrupted
- write the result(s) file(s), if any
-
throw an exception to cancel the job when an error occurs:
- InterruptedException for ABORT
- UWSException for ERROR
Resources
Resource | Type | Description |
---|---|---|
Timers: Request form | Form | Form to request to the described UWS: Timers. |
Timers | Example | Implementation of the described UWS: Timers. |
UWSTimers | Source | Servlet which corresponds to the UWS Timers. It manages the JobList timers. |
JobChrono | Source | The kind of Job used in our UWS Timers. It waits during the given time (in seconds). |
Servlet Template | Source | A servlet template of a UWS service. |