Class ZPageHandler
- java.lang.Object
-
- io.opentelemetry.sdk.extension.zpages.ZPageHandler
-
public abstract class ZPageHandler extends Object
The main interface for all zPages. All zPages should implement this interface to allow the HTTP server implementation to support these pages.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidemitHtml(Map<String,String> queryMap, OutputStream outputStream)Emits the generated HTML page to theoutputStream.abstract StringgetPageDescription()Returns the description of the zPage.abstract StringgetPageName()Returns the name of the zPage.abstract StringgetUrlPath()Returns the URL path that should be used to register this zPage to the HTTP server.booleanprocessRequest(String requestMethod, Map<String,String> queryMap, OutputStream outputStream)Process requests that require changes (POST/PUT/DELETE).
-
-
-
Method Detail
-
getUrlPath
public abstract String getUrlPath()
Returns the URL path that should be used to register this zPage to the HTTP server.- Returns:
- the URL path that should be used to register this zPage to the HTTP server.
-
getPageName
public abstract String getPageName()
Returns the name of the zPage.- Returns:
- the name of the zPage.
-
getPageDescription
public abstract String getPageDescription()
Returns the description of the zPage.- Returns:
- the description of the zPage.
-
processRequest
public boolean processRequest(String requestMethod, Map<String,String> queryMap, OutputStream outputStream)
Process requests that require changes (POST/PUT/DELETE).- Parameters:
requestMethod- the request method HttpHandler received.queryMap- the map of the URL query parameters.- Returns:
- true if theres an error while processing the request.
-
emitHtml
public abstract void emitHtml(Map<String,String> queryMap, OutputStream outputStream)
Emits the generated HTML page to theoutputStream.- Parameters:
queryMap- the map of the URL query parameters.outputStream- the output for the generated HTML page.
-
-