public class NativeHandlers
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
NativeHandlers.Encoders
The set of available content encoders.
|
protected static class |
NativeHandlers.Expanding |
static class |
NativeHandlers.Parsers
The default collection of response content parsers.
|
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.ThreadLocal<NativeHandlers.Expanding> |
tlExpanding |
| Constructor and Description |
|---|
NativeHandlers() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
exception(java.lang.Throwable thrown)
Default exception handler.
|
static java.lang.Object |
failure(FromServer fromServer,
java.lang.Object data)
Default failure handler.
|
static java.lang.Object |
success(FromServer fromServer,
java.lang.Object data)
Default success handler, just returns the passed data, which is the data
returned by the invoked parser.
|
protected static final java.lang.ThreadLocal<NativeHandlers.Expanding> tlExpanding
public static java.lang.Object success(FromServer fromServer, java.lang.Object data)
Default success handler, just returns the passed data, which is the data returned by the invoked parser.
fromServer - Backend independent representation of what the server returneddata - The parsed datapublic static java.lang.Object failure(FromServer fromServer, java.lang.Object data)
Default failure handler. Throws an HttpException.
fromServer - Backend independent representation of what the server returneddata - If parsing was possible, this will be the parsed data, otherwise nullHttpExceptionpublic static java.lang.Object exception(java.lang.Throwable thrown)
Default exception handler. Throws a RuntimeException.
thrown - The original thrown exceptionjava.lang.RuntimeException