org.apache.ace.deployment.servlet
Class DeploymentServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.ace.deployment.servlet.DeploymentServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.osgi.service.cm.ManagedService

public class DeploymentServlet
extends javax.servlet.http.HttpServlet
implements org.osgi.service.cm.ManagedService

The DeploymentServlet class provides in a list of versions available for a gateway and a stream of data containing the DeploymentPackage (or fix package) for a specific gateway and version.

See Also:
Serialized Form

Field Summary
static String CURRENT
           
static String DP_MIMETYPE
           
static String TEXT_MIMETYPE
           
static String VERSIONS
           
 
Constructor Summary
DeploymentServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Responds to GET requests sent to this endpoint, the response depends on the requested path: http://host/endpoint/gatewayid/versions/ returns a list of versions available for the specified gateway http://host/endpoint/gatewayid/versions/x.y.z returns a deployment package stream for the specified gateway and version The status code of the response can be one of the following: HttpServletResponse.SC_BAD_REQUEST - If no gateway is specified or the request is malformed in a different way.
 String getServletInfo()
           
 void updated(Dictionary settings)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, 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
 

Field Detail

CURRENT

public static final String CURRENT
See Also:
Constant Field Values

VERSIONS

public static final String VERSIONS
See Also:
Constant Field Values

DP_MIMETYPE

public static final String DP_MIMETYPE
See Also:
Constant Field Values

TEXT_MIMETYPE

public static final String TEXT_MIMETYPE
See Also:
Constant Field Values
Constructor Detail

DeploymentServlet

public DeploymentServlet()
Method Detail

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws IOException
Responds to GET requests sent to this endpoint, the response depends on the requested path:
  • http://host/endpoint/gatewayid/versions/ returns a list of versions available for the specified gateway
  • http://host/endpoint/gatewayid/versions/x.y.z returns a deployment package stream for the specified gateway and version The status code of the response can be one of the following:
  • HttpServletResponse.SC_BAD_REQUEST - If no gateway is specified or the request is malformed in a different way.
  • HttpServletResponse.SC_NOT_FOUND - If the specified gateway or version does not exist.
  • HttpServletResponse.SC_INTERNAL_SERVER_ERROR - If there was a problem processing the request.
  • HttpServletResponse.SC_OK - If all went fine

    Overrides:
    doGet in class javax.servlet.http.HttpServlet
    Throws:
    IOException

  • 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.