org.apache.ace.obr.servlet
Class BundleServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.ace.obr.servlet.BundleServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.osgi.service.cm.ManagedService
public class BundleServlet
- extends javax.servlet.http.HttpServlet
- implements org.osgi.service.cm.ManagedService
- See Also:
- Serialized Form
Method Summary |
protected void |
doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Responds to DELETE requests sent to http://host:port/obr/resource by deleting the file specified. |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Responds to GET requests sent to http://host:port/obr/resource with a stream to the specified filename. |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Responds to POST requests sent to http://host:port/obr/resource by writing the received data to the bundle store. |
String |
getServletInfo()
|
void |
updated(Dictionary settings)
|
Methods inherited from class javax.servlet.http.HttpServlet |
doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TEXT_MIMETYPE
public static final String TEXT_MIMETYPE
- See Also:
- Constant Field Values
BundleServlet
public BundleServlet()
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Responds to POST requests sent to http://host:port/obr/resource by writing the received data to the bundle store.
Will send out a response that contains one of the following status codes:
HttpServletResponse.SC_BAD_REQUEST
- if no resource was specified
HttpServletResponse.SC_CONFLICT
- if the resource already exists
HttpServletResponse.SC_INTERNAL_SERVER_ERROR
- if there was a problem storing the resource
HttpServletResponse.SC_OK
- if all went fine
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
doDelete
protected void doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Responds to DELETE requests sent to http://host:port/obr/resource by deleting the file specified.
Will send out a response that contains one of the following status codes:
HttpServletResponse.SC_BAD_REQUEST
- if no resource was specified
HttpServletResponse.SC_NOT_FOUND
- if the specified resource did not exist
HttpServletResponse.SC_INTERNAL_SERVER_ERROR
- if there was a problem deleting the resource
HttpServletResponse.SC_OK
- if all went fine
- Overrides:
doDelete
in class javax.servlet.http.HttpServlet
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Responds to GET requests sent to http://host:port/obr/resource with a stream to the specified filename.
Will send out a response that contains one of the following status codes:
HttpServletResponse.SC_BAD_REQUEST
- if no resource is specified
HttpServletResponse.SC_INTERNAL_SERVER_ERROR
- if there was a problem storing the resource
HttpServletResponse.SC_OK
- if all went fine
The response will only contain the data of the requested resource if the status code of the response is
HttpServletResponse.SC_OK
.
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
getServletInfo
public String getServletInfo()
- Specified by:
getServletInfo
in interface javax.servlet.Servlet
- Overrides:
getServletInfo
in class javax.servlet.GenericServlet
updated
public void updated(Dictionary settings)
throws org.osgi.service.cm.ConfigurationException
- Specified by:
updated
in interface org.osgi.service.cm.ManagedService
- Throws:
org.osgi.service.cm.ConfigurationException
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.