Class ObjectWriter
java.lang.Object
com.tangosol.coherence.rest.providers.ObjectWriter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<Object>
@Provider
public class ObjectWriter
extends Object
implements jakarta.ws.rs.ext.MessageBodyWriter<Object>
Provider responsible for marshalling Java objects.
- Author:
- as 2011.07.15
-
Constructor Summary
ConstructorDescriptionDefault constructor.ObjectWriter
(MarshallerRegistry registry) Construct an ObjectWriter instance. -
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(Object obj, Class<?> clz, Type type, Annotation[] aAnnotation, jakarta.ws.rs.core.MediaType mediaType) boolean
isWriteable
(Class<?> clz, Type type, Annotation[] aAnnotation, jakarta.ws.rs.core.MediaType mediaType) void
writeTo
(Object obj, Class<?> clz, Type type, Annotation[] aAnnotation, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream stream)
-
Constructor Details
-
ObjectWriter
public ObjectWriter()Default constructor. -
ObjectWriter
Construct an ObjectWriter instance.- Parameters:
registry
- marshaller registry to use
-
-
Method Details
-
isWriteable
public boolean isWriteable(Class<?> clz, Type type, Annotation[] aAnnotation, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteable
in interfacejakarta.ws.rs.ext.MessageBodyWriter<Object>
-
getSize
public long getSize(Object obj, Class<?> clz, Type type, Annotation[] aAnnotation, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSize
in interfacejakarta.ws.rs.ext.MessageBodyWriter<Object>
-
writeTo
public void writeTo(Object obj, Class<?> clz, Type type, Annotation[] aAnnotation, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream stream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
writeTo
in interfacejakarta.ws.rs.ext.MessageBodyWriter<Object>
- Throws:
IOException
jakarta.ws.rs.WebApplicationException
-