Package com.backblaze.b2.json
Class B2JsonConcurrentMapHandler
- java.lang.Object
-
- com.backblaze.b2.json.B2JsonInitializedTypeHandler<T>
-
- com.backblaze.b2.json.B2JsonNonUrlTypeHandler<java.util.concurrent.ConcurrentMap>
-
- com.backblaze.b2.json.B2JsonConcurrentMapHandler
-
- All Implemented Interfaces:
B2JsonTypeHandler<java.util.concurrent.ConcurrentMap>
public class B2JsonConcurrentMapHandler extends B2JsonNonUrlTypeHandler<java.util.concurrent.ConcurrentMap>
-
-
Constructor Summary
Constructors Constructor Description B2JsonConcurrentMapHandler(B2JsonTypeHandler keyHandler, B2JsonTypeHandler valueHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.ConcurrentMap
defaultValueForOptional()
Returns the default value to use when an optional field is not present.java.util.concurrent.ConcurrentMap
deserialize(B2JsonReader in, B2JsonOptions options)
Deserialize one object from a JSON input stream.java.lang.reflect.Type
getHandledType()
What class does this handle?boolean
isStringInJson()
Does this type look like a string in JSON?void
serialize(java.util.concurrent.ConcurrentMap obj, B2JsonOptions options, B2JsonWriter out)
Serialize one object of the class to a JSON output stream.-
Methods inherited from class com.backblaze.b2.json.B2JsonNonUrlTypeHandler
deserializeUrlParam
-
Methods inherited from class com.backblaze.b2.json.B2JsonInitializedTypeHandler
initializeImplementation, isInitialized
-
-
-
-
Constructor Detail
-
B2JsonConcurrentMapHandler
public B2JsonConcurrentMapHandler(B2JsonTypeHandler keyHandler, B2JsonTypeHandler valueHandler) throws B2JsonException
- Throws:
B2JsonException
-
-
Method Detail
-
getHandledType
public java.lang.reflect.Type getHandledType()
Description copied from interface:B2JsonTypeHandler
What class does this handle?- Returns:
-
serialize
public void serialize(java.util.concurrent.ConcurrentMap obj, B2JsonOptions options, B2JsonWriter out) throws java.io.IOException, B2JsonException
Description copied from interface:B2JsonTypeHandler
Serialize one object of the class to a JSON output stream. The object is guaranteed not to be null.- Throws:
java.io.IOException
B2JsonException
-
deserialize
public java.util.concurrent.ConcurrentMap deserialize(B2JsonReader in, B2JsonOptions options) throws B2JsonException, java.io.IOException
Description copied from interface:B2JsonTypeHandler
Deserialize one object from a JSON input stream. Will never be called when there is "null" in the input stream, and will never return null.- Throws:
B2JsonException
java.io.IOException
-
defaultValueForOptional
public java.util.concurrent.ConcurrentMap defaultValueForOptional()
Description copied from interface:B2JsonTypeHandler
Returns the default value to use when an optional field is not present.
-
isStringInJson
public boolean isStringInJson()
Description copied from interface:B2JsonTypeHandler
Does this type look like a string in JSON?
-
-