Class JacksonCodec
- java.lang.Object
-
- io.scalecube.services.transport.jackson.JacksonCodec
-
- All Implemented Interfaces:
DataCodec,HeadersCodec
public final class JacksonCodec extends Object implements DataCodec, HeadersCodec
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_TYPE-
Fields inherited from interface io.scalecube.services.transport.api.HeadersCodec
INSTANCES
-
-
Constructor Summary
Constructors Constructor Description JacksonCodec()JacksonCodec(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcontentType()Map<String,String>decode(InputStream stream)Objectdecode(InputStream stream, Type type)voidencode(OutputStream stream, Object value)voidencode(OutputStream stream, Map<String,String> headers)
-
-
-
Field Detail
-
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
contentType
public String contentType()
- Specified by:
contentTypein interfaceDataCodec- Specified by:
contentTypein interfaceHeadersCodec
-
encode
public void encode(OutputStream stream, Map<String,String> headers) throws IOException
- Specified by:
encodein interfaceHeadersCodec- Throws:
IOException
-
encode
public void encode(OutputStream stream, Object value) throws IOException
- Specified by:
encodein interfaceDataCodec- Throws:
IOException
-
decode
public Map<String,String> decode(InputStream stream) throws IOException
- Specified by:
decodein interfaceHeadersCodec- Throws:
IOException
-
decode
public Object decode(InputStream stream, Type type) throws IOException
- Specified by:
decodein interfaceDataCodec- Throws:
IOException
-
-