Class ResourceHandler
- java.lang.Object
-
- fish.payara.monitoring.rest.app.handler.ResourceHandler
-
- Direct Known Subclasses:
ReadHandler
,VersionHandler
public abstract class ResourceHandler extends Object
- Author:
- Fraser Savage
-
-
Field Summary
Fields Modifier and Type Field Description protected MBeanServerDelegate
delegate
-
Constructor Summary
Constructors Constructor Description ResourceHandler(MBeanServerDelegate delegate)
Constructs theResourceHandler
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.json.JsonObject
getResource()
Returns aJsonObject
containing the response to the request given to the implementing class.protected jakarta.json.JsonObject
getTraceObject(Exception exception)
Gets the JsonObject containing information about the exception passedprotected void
setStatus(jakarta.ws.rs.core.Response.Status status)
-
-
-
Field Detail
-
delegate
protected final MBeanServerDelegate delegate
-
-
Constructor Detail
-
ResourceHandler
public ResourceHandler(MBeanServerDelegate delegate)
Constructs theResourceHandler
.- Parameters:
delegate
- TheMBeanServerDelegate
to get information from.
-
-
Method Detail
-
getResource
public jakarta.json.JsonObject getResource()
Returns aJsonObject
containing the response to the request given to the implementing class. The response is made up of a request object and a value object. In some cases the value object is removed in the case of an exception and replaced with an error object.- Returns:
- The
JsonObject
containing the response to the request.
-
setStatus
protected void setStatus(jakarta.ws.rs.core.Response.Status status)
-
getTraceObject
protected jakarta.json.JsonObject getTraceObject(Exception exception) throws jakarta.json.JsonException
Gets the JsonObject containing information about the exception passed- Throws:
jakarta.json.JsonException
-
-