@Singleton public class ParseJson<T> extends Object implements com.google.common.base.Function<HttpResponse,T>
| Modifier and Type | Field and Description |
|---|---|
protected Json |
json |
protected Logger |
logger |
protected com.google.inject.TypeLiteral<T> |
type |
| Constructor and Description |
|---|
ParseJson(Json json,
com.google.inject.TypeLiteral<T> type) |
| Modifier and Type | Method and Description |
|---|---|
T |
apply(HttpResponse from)
parses the http response body to create a new
<T>. |
T |
apply(InputStream stream) |
<V> V |
apply(InputStream stream,
Type type) |
protected Logger logger
protected final Json json
protected final com.google.inject.TypeLiteral<T> type
public T apply(HttpResponse from)
<T>.apply in interface com.google.common.base.Function<HttpResponse,T>public T apply(InputStream stream) throws IOException
IOExceptionpublic <V> V apply(InputStream stream, Type type) throws IOException
IOExceptionCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.