T - Type for the return Object of the Http resourcepublic class HttpRequestTemplate<T> extends RequestTemplate<T,io.reactivex.netty.protocol.http.client.HttpClientResponse<io.netty.buffer.ByteBuf>>
Note: This class is not thread safe. It is advised that the template is created and
constructed in same thread at initialization of the application. Users can call requestBuilder()
later on which returns a RequestBuilder which is thread safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpRequestTemplate.Builder<T> |
static class |
HttpRequestTemplate.CacheProviderWithKeyTemplate<T> |
RequestTemplate.RequestBuilder<T>| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CACHE_HYSTRIX_COMMAND_SUFFIX |
static int |
DEFAULT_CACHE_TIMEOUT |
| Modifier | Constructor and Description |
|---|---|
protected |
HttpRequestTemplate(java.lang.String name,
HttpResourceGroup group,
java.lang.Class<? extends T> classType,
com.netflix.hystrix.HystrixObservableCommand.Setter setter,
io.netty.handler.codec.http.HttpMethod method,
io.netty.handler.codec.http.HttpHeaders headers,
ParsedTemplate uriTemplate,
FallbackHandler<T> fallbackHandler,
ResponseValidator<io.reactivex.netty.protocol.http.client.HttpClientResponse<io.netty.buffer.ByteBuf>> validator,
HttpRequestTemplate.CacheProviderWithKeyTemplate<T> cacheProvider,
ParsedTemplate hystrixCacheKeyTemplate) |
| Modifier and Type | Method and Description |
|---|---|
protected com.netflix.hystrix.HystrixObservableCommand.Setter |
cacheHystrixProperties() |
protected HttpRequestTemplate.CacheProviderWithKeyTemplate<T> |
cacheProvider() |
HttpRequestTemplate<T> |
copy(java.lang.String name) |
protected FallbackHandler<T> |
fallbackHandler() |
protected java.lang.Class<? extends T> |
getClassType() |
protected io.reactivex.netty.protocol.http.client.HttpClient<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> |
getClient() |
protected io.netty.handler.codec.http.HttpHeaders |
getHeaders() |
protected ParsedTemplate |
hystrixCacheKeyTemplate() |
protected com.netflix.hystrix.HystrixObservableCommand.Setter |
hystrixProperties() |
protected io.netty.handler.codec.http.HttpMethod |
method() |
java.lang.String |
name() |
HttpRequestBuilder<T> |
requestBuilder() |
protected ResponseValidator<io.reactivex.netty.protocol.http.client.HttpClientResponse<io.netty.buffer.ByteBuf>> |
responseValidator() |
protected ParsedTemplate |
uriTemplate() |
public static final java.lang.String CACHE_HYSTRIX_COMMAND_SUFFIX
public static final int DEFAULT_CACHE_TIMEOUT
protected HttpRequestTemplate(java.lang.String name,
HttpResourceGroup group,
java.lang.Class<? extends T> classType,
com.netflix.hystrix.HystrixObservableCommand.Setter setter,
io.netty.handler.codec.http.HttpMethod method,
io.netty.handler.codec.http.HttpHeaders headers,
ParsedTemplate uriTemplate,
FallbackHandler<T> fallbackHandler,
ResponseValidator<io.reactivex.netty.protocol.http.client.HttpClientResponse<io.netty.buffer.ByteBuf>> validator,
HttpRequestTemplate.CacheProviderWithKeyTemplate<T> cacheProvider,
ParsedTemplate hystrixCacheKeyTemplate)
public HttpRequestBuilder<T> requestBuilder()
requestBuilder in class RequestTemplate<T,io.reactivex.netty.protocol.http.client.HttpClientResponse<io.netty.buffer.ByteBuf>>protected final ParsedTemplate hystrixCacheKeyTemplate()
protected final HttpRequestTemplate.CacheProviderWithKeyTemplate<T> cacheProvider()
protected final ResponseValidator<io.reactivex.netty.protocol.http.client.HttpClientResponse<io.netty.buffer.ByteBuf>> responseValidator()
protected final FallbackHandler<T> fallbackHandler()
protected final ParsedTemplate uriTemplate()
protected final io.netty.handler.codec.http.HttpMethod method()
protected final java.lang.Class<? extends T> getClassType()
protected final io.netty.handler.codec.http.HttpHeaders getHeaders()
public java.lang.String name()
name in class RequestTemplate<T,io.reactivex.netty.protocol.http.client.HttpClientResponse<io.netty.buffer.ByteBuf>>public HttpRequestTemplate<T> copy(java.lang.String name)
copy in class RequestTemplate<T,io.reactivex.netty.protocol.http.client.HttpClientResponse<io.netty.buffer.ByteBuf>>protected final com.netflix.hystrix.HystrixObservableCommand.Setter hystrixProperties()
protected final com.netflix.hystrix.HystrixObservableCommand.Setter cacheHystrixProperties()
protected final io.reactivex.netty.protocol.http.client.HttpClient<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> getClient()