Class CumulocityJSONMessageBodyWriter
java.lang.Object
com.cumulocity.sdk.client.rest.providers.CumulocityJSONMessageBodyWriter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<BaseResourceRepresentation>
@Provider
public class CumulocityJSONMessageBodyWriter
extends Object
implements jakarta.ws.rs.ext.MessageBodyWriter<BaseResourceRepresentation>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(BaseResourceRepresentation t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) voidwriteTo(BaseResourceRepresentation representation, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
Constructor Details
-
CumulocityJSONMessageBodyWriter
public CumulocityJSONMessageBodyWriter()
-
-
Method Details
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<BaseResourceRepresentation>
-
getSize
public long getSize(BaseResourceRepresentation t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSizein interfacejakarta.ws.rs.ext.MessageBodyWriter<BaseResourceRepresentation>
-
writeTo
public void writeTo(BaseResourceRepresentation representation, 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:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<BaseResourceRepresentation>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-