Package org.apache.hadoop.ozone.om
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 -
Method Summary
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
ServiceListJSONServlet
public ServiceListJSONServlet()
-
-
Method Details
-
init
public void init() throws javax.servlet.ServletException- Overrides:
initin classjavax.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:
doGetin classjavax.servlet.http.HttpServlet- Parameters:
request- The servlet request we are processingresponse- The servlet response we are creating
-