Class KeyConverterAdapter

java.lang.Object
com.tangosol.coherence.rest.io.KeyConverterAdapter
All Implemented Interfaces:
Marshaller<Object>

public class KeyConverterAdapter extends Object implements Marshaller<Object>
Marshaller that marshalls objects using a cache's key converter.
Author:
vp 2011.07.26
  • Constructor Details

    • KeyConverterAdapter

      public KeyConverterAdapter(KeyConverter converter)
      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 IOException
      Description copied from interface: Marshaller
      Write the specified object into the given stream.
      Specified by:
      marshal in interface Marshaller<Object>
      Parameters:
      oValue - object to marshall
      out - the OutputStream 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

      public Object unmarshal(InputStream in, jakarta.ws.rs.core.MediaType mediaType) throws IOException
      Description copied from interface: Marshaller
      Read an object from the specified stream.
      Specified by:
      unmarshal in interface Marshaller<Object>
      Parameters:
      in - stream to read from
      mediaType - the media type of the object to read
      Returns:
      unmarshalled object instance
      Throws:
      IOException - if an error occurs during unmarshalling