Class ServiceListJSONServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.hadoop.ozone.om.ServiceListJSONServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ServiceListJSONServlet extends javax.servlet.http.HttpServlet
Provides REST access to Ozone Service List.

This servlet generally will be placed under the /serviceList URL of OzoneManager HttpServer. The return format is of JSON and in the form


  {
    "services" : [
      {
        "NodeType":"OM",
        "Hostname" "$hostname",
        "ports" : {
          "$PortType" : "$port",
          ...
        }
      }
    ]
  }
  

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
    Process a GET request for the specified resource.
    void
     

    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, getServletInfo, getServletName, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServiceListJSONServlet

      public ServiceListJSONServlet()
  • Method Details

    • init

      public void init() throws javax.servlet.ServletException
      Overrides:
      init in class javax.servlet.GenericServlet
      Throws:
      javax.servlet.ServletException
    • doGet

      public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Process a GET request for the specified resource.
      Overrides:
      doGet in class javax.servlet.http.HttpServlet
      Parameters:
      request - The servlet request we are processing
      response - The servlet response we are creating