Class EntryWriter
java.lang.Object
com.tangosol.coherence.rest.providers.EntryWriter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<Object>
@Provider
@Produces({"application/xml","application/json"})
public class EntryWriter
extends Object
implements jakarta.ws.rs.ext.MessageBodyWriter<Object>
Provider responsible for marshalling map entries.
- Author:
- as 2015.07.22
-
Constructor Summary
ConstructorDescriptionDefault constructor.EntryWriter
(MarshallerRegistry registry) Construct an EntryWriter instance. -
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(Object entry, 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 oEntry, Class<?> clz, Type type, Annotation[] aAnnotation, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream stream)
-
Constructor Details
-
EntryWriter
public EntryWriter()Default constructor. -
EntryWriter
Construct an EntryWriter 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 entry, 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 oEntry, 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
-