Package io.ably.lib.util
Class Serialisation.HttpBodyHandler<T>
- java.lang.Object
-
- io.ably.lib.util.Serialisation.HttpBodyHandler<T>
-
- All Implemented Interfaces:
HttpCore.BodyHandler<T>
- Enclosing class:
- Serialisation
public static class Serialisation.HttpBodyHandler<T> extends java.lang.Object implements HttpCore.BodyHandler<T>
-
-
Constructor Summary
Constructors Constructor Description HttpBodyHandler()If the target type extends JsonElement, we don't need to convert JsonElements to it.HttpBodyHandler(java.lang.Class<T[]> klass, Serialisation.FromJsonElement<T> converter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T[]handleResponseBody(java.lang.String contentType, byte[] body)
-
-
-
Constructor Detail
-
HttpBodyHandler
public HttpBodyHandler(java.lang.Class<T[]> klass, Serialisation.FromJsonElement<T> converter)
-
HttpBodyHandler
public HttpBodyHandler()
If the target type extends JsonElement, we don't need to convert JsonElements to it. We can just force-cast.
-
-
Method Detail
-
handleResponseBody
public T[] handleResponseBody(java.lang.String contentType, byte[] body) throws AblyException
- Specified by:
handleResponseBodyin interfaceHttpCore.BodyHandler<T>- Throws:
AblyException
-
-