Class ProgressStatusJsonProvider
- java.lang.Object
-
- org.glassfish.admin.rest.provider.BaseProvider<ProgressStatusBase>
-
- org.glassfish.admin.rest.provider.ProgressStatusJsonProvider
-
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<ProgressStatusBase>
@Provider @Produces({"application/json","application/x-javascript"}) public class ProgressStatusJsonProvider extends BaseProvider<ProgressStatusBase>
Marshal ProgressStatus to JSON- Author:
- mmares
-
-
Field Summary
-
Fields inherited from class org.glassfish.admin.rest.provider.BaseProvider
desiredType, habitat, HEADER_DEBUG, JSONP_CALLBACK, requestHeaders, supportedMediaTypes, uriInfo
-
-
Constructor Summary
Constructors Constructor Description ProgressStatusJsonProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContent(ProgressStatusBase proxy)
protected boolean
isGivenTypeWritable(Class<?> type, Type genericType)
Overwrite this if you need different test of type compatibility.void
writeJson(String name, ProgressStatusBase ps, int allocatedSteps, com.fasterxml.jackson.core.JsonGenerator out)
void
writeTo(ProgressStatusBase proxy, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
Methods inherited from class org.glassfish.admin.rest.provider.BaseProvider
canShowDeprecatedItems, canShowHiddenCommands, getCallBackJSONP, getResourceLinks, getResourceLinks, getSize, getXmlCommandLinks, isDebug, isWriteable
-
-
-
-
Method Detail
-
isGivenTypeWritable
protected boolean isGivenTypeWritable(Class<?> type, Type genericType)
Description copied from class:BaseProvider
Overwrite this if you need different test of type compatibility. Used from isWritable method.- Overrides:
isGivenTypeWritable
in classBaseProvider<ProgressStatusBase>
-
writeTo
public void writeTo(ProgressStatusBase proxy, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException
- Specified by:
writeTo
in interfacejakarta.ws.rs.ext.MessageBodyWriter<ProgressStatusBase>
- Overrides:
writeTo
in classBaseProvider<ProgressStatusBase>
- Throws:
IOException
jakarta.ws.rs.WebApplicationException
-
writeJson
public void writeJson(String name, ProgressStatusBase ps, int allocatedSteps, com.fasterxml.jackson.core.JsonGenerator out) throws IOException
- Throws:
IOException
-
getContent
public String getContent(ProgressStatusBase proxy)
- Specified by:
getContent
in classBaseProvider<ProgressStatusBase>
-
-