Package com.tangosol.coherence.rest.io
Class KeyConverterAdapter
java.lang.Object
com.tangosol.coherence.rest.io.KeyConverterAdapter
- All Implemented Interfaces:
Marshaller<Object>
Marshaller that marshalls objects using a cache's key converter.
- Author:
- vp 2011.07.26
-
Field Summary
Fields inherited from interface com.tangosol.coherence.rest.io.Marshaller
FORMAT_OUTPUT
-
Constructor Summary
ConstructorDescriptionKeyConverterAdapter
(KeyConverter converter) Construct KeyConverterAdapter instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
marshal
(Object oValue, OutputStream out, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders) Write the specified object into the given stream.unmarshal
(InputStream in, jakarta.ws.rs.core.MediaType mediaType) Read an object from the specified stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tangosol.coherence.rest.io.Marshaller
marshalAsFragment
-
Constructor Details
-
KeyConverterAdapter
Construct KeyConverterAdapter instance.- Parameters:
converter
- key converter used to marshall key objects
-
-
Method Details
-
marshal
public void marshal(Object oValue, OutputStream out, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders) throws IOExceptionDescription copied from interface:Marshaller
Write the specified object into the given stream.- Specified by:
marshal
in interfaceMarshaller<Object>
- Parameters:
oValue
- object to marshallout
- theOutputStream
for the HTTP entity. The implementation should not close the output stream.httpHeaders
- a mutable map of the HTTP message headers.- Throws:
IOException
- if an error occurs during marshalling
-
unmarshal
Description copied from interface:Marshaller
Read an object from the specified stream.- Specified by:
unmarshal
in interfaceMarshaller<Object>
- Parameters:
in
- stream to read frommediaType
- the media type of the object to read- Returns:
- unmarshalled object instance
- Throws:
IOException
- if an error occurs during unmarshalling
-