class CommandResultCodecProvider<P> extends java.lang.Object implements CodecProvider
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.Class<?>,Codec<?>> |
codecs |
private java.lang.String |
fieldContainingPayload |
private Decoder<P> |
payloadDecoder |
| Constructor and Description |
|---|
CommandResultCodecProvider(Decoder<P> payloadDecoder,
java.lang.String fieldContainingPayload)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
private <T extends BsonValue> |
addCodec(Codec<T> codec) |
private void |
addCodecs() |
boolean |
equals(java.lang.Object o) |
<T> Codec<T> |
get(java.lang.Class<T> clazz,
CodecRegistry registry)
Get a
Codec using the given context, which includes, most importantly, the Class for which a Codec is required. |
int |
hashCode() |
private final java.util.Map<java.lang.Class<?>,Codec<?>> codecs
private final java.lang.String fieldContainingPayload
public CommandResultCodecProvider(Decoder<P> payloadDecoder, java.lang.String fieldContainingPayload)
payloadDecoder - the specific decoder to use on the field.fieldContainingPayload - the field name to be decoded with the payloadDecoder.public <T> Codec<T> get(java.lang.Class<T> clazz, CodecRegistry registry)
CodecProviderCodec using the given context, which includes, most importantly, the Class for which a Codec is required.get in interface CodecProviderT - the type of the class for which a Codec is requiredclazz - the Class for which to get a Codecregistry - the registry to use for resolving dependent Codec instancesprivate void addCodecs()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object