uk.ac.starlink.ttools.server
Class TaskServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
uk.ac.starlink.ttools.server.TaskServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class TaskServlet
- extends javax.servlet.http.HttpServlet
Servlet implementation which allows STILTS commands to be executed
server-side.
Both GET and POST methods are accepted.
- Since:
- 6 Oct 2008
- Author:
- Mark Taylor
- See Also:
- Serialized Form
Method Summary |
void |
destroy()
|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
String |
getServletInfo()
|
static String[] |
getTaskNames(uk.ac.starlink.util.ObjectFactory taskFactory,
String taskList)
Returns an array of the known tasks from a given task factory
based on a space-separated list. |
void |
init(javax.servlet.ServletConfig config)
|
protected void |
process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Does the work for a GET or POST request - they have the same behaviour. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TaskServlet
public TaskServlet()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Specified by:
init
in interface javax.servlet.Servlet
- Overrides:
init
in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
destroy
public void destroy()
- Specified by:
destroy
in interface javax.servlet.Servlet
- Overrides:
destroy
in class javax.servlet.GenericServlet
getServletInfo
public String getServletInfo()
- Specified by:
getServletInfo
in interface javax.servlet.Servlet
- Overrides:
getServletInfo
in class javax.servlet.GenericServlet
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Throws:
IOException
javax.servlet.ServletException
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Throws:
IOException
javax.servlet.ServletException
process
protected void process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
- Does the work for a GET or POST request - they have the same behaviour.
- Parameters:
request
- requestresponse
- response
- Throws:
IOException
javax.servlet.ServletException
getTaskNames
public static String[] getTaskNames(uk.ac.starlink.util.ObjectFactory taskFactory,
String taskList)
- Returns an array of the known tasks from a given task factory
based on a space-separated list.
An exception will be thrown if unknown tasks appear.
- Parameters:
taskList
- space-separated list of tasks to includetaskFactory
- STILTS task factory
- Throws:
IllegalArgumentException
- if any unknown task name
is included in taskList
Copyright © 2009 Central Laboratory of the Research Councils. All Rights Reserved.