Class ZPageHandler
java.lang.Object
io.opentelemetry.sdk.extension.zpages.ZPageHandler
The main interface for all zPages. All zPages should implement this interface to allow the HTTP
server implementation to support these pages.
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
emitHtml
(Map<String, String> queryMap, OutputStream outputStream) Emits the generated HTML page to theoutputStream
.abstract String
Returns the description of the zPage.abstract String
Returns the name of the zPage.abstract String
Returns the URL path that should be used to register this zPage to the HTTP server.boolean
processRequest
(String requestMethod, Map<String, String> queryMap, OutputStream outputStream) Process requests that require changes (POST/PUT/DELETE).
-
Method Details
-
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
Returns the name of the zPage.- Returns:
- the name of the zPage.
-
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
Emits the generated HTML page to theoutputStream
.- Parameters:
queryMap
- the map of the URL query parameters.outputStream
- the output for the generated HTML page.
-