org.refcodes.mixin.Dumpable
, RestRequest
, RestRequestBuilder
, org.refcodes.web.HeaderFieldsAccessor<org.refcodes.web.RequestHeaderFields>
, org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsBuilder<org.refcodes.web.RequestHeaderFields,RestRequestBuilder>
, org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsMutator<org.refcodes.web.RequestHeaderFields>
, org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsProperty<org.refcodes.web.RequestHeaderFields>
, org.refcodes.web.HttpBodyAccessor.HttpBodyProvider<org.refcodes.web.RequestHeaderFields>
, org.refcodes.web.HttpClientRequest
, org.refcodes.web.HttpClientRequest.HttpClientRequestBuilder
, org.refcodes.web.HttpMethodAccessor
, org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<org.refcodes.web.RequestHeaderFields>
, org.refcodes.web.HttpMethodAccessor.HttpMethodMutator
, org.refcodes.web.HttpMethodAccessor.HttpMethodProperty
, org.refcodes.web.HttpRequest
, org.refcodes.web.HttpRequestBuilder<org.refcodes.web.RequestHeaderFields>
, org.refcodes.web.RedirectDepthAccessor
, org.refcodes.web.RedirectDepthAccessor.RedirectDepthBuilder<org.refcodes.web.RequestHeaderFields>
, org.refcodes.web.RedirectDepthAccessor.RedirectDepthMutator
, org.refcodes.web.RedirectDepthAccessor.RedirectDepthProperty
, org.refcodes.web.UrlAccessor
, org.refcodes.web.UrlAccessor.UrlBuilder
, org.refcodes.web.UrlAccessor.UrlMutator
public class RestRequestBuilderImpl extends org.refcodes.web.HttpClientRequestImpl implements RestRequestBuilder
RestResponseHandler
interface as good old
POJO for use by different RestClient
implementations.org.refcodes.web.HttpClientRequest.HttpClientRequestBuilder
org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<B extends org.refcodes.web.HttpMethodAccessor.HttpMethodBuilder<B>>, org.refcodes.web.HttpMethodAccessor.HttpMethodMutator, org.refcodes.web.HttpMethodAccessor.HttpMethodProperty
org.refcodes.web.RedirectDepthAccessor.RedirectDepthBuilder<B extends org.refcodes.web.RedirectDepthAccessor.RedirectDepthBuilder<B>>, org.refcodes.web.RedirectDepthAccessor.RedirectDepthMutator, org.refcodes.web.RedirectDepthAccessor.RedirectDepthProperty
Modifier | Constructor | Description |
---|---|---|
protected |
RestRequestBuilderImpl(RestClient aRestClient) |
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod,
org.refcodes.web.Url aUrl,
int aRedirectDepth,
RestClient aRestClient) |
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod,
org.refcodes.web.Url aUrl,
Object aRequest,
int aRedirectDepth,
RestClient aRestClient) |
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod,
org.refcodes.web.Url aUrl,
Object aRequest,
RestClient aRestClient) |
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod,
org.refcodes.web.Url aUrl,
RestClient aRestClient) |
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod,
org.refcodes.web.Url aUrl,
org.refcodes.web.RequestHeaderFields aHeaderFields,
Object aRequest,
int aRedirectDepth,
RestClient aRestClient) |
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod,
org.refcodes.web.Url aUrl,
org.refcodes.web.RequestHeaderFields aHeaderFields,
Object aRequest,
RestClient aRestClient) |
Instantiates a new rest request builder impl.
|
Modifier and Type | Method | Description |
---|---|---|
org.refcodes.web.HttpMethod |
getHttpMethod() |
|
org.refcodes.web.Url.UrlBuilder |
getUrl() |
|
void |
setHeaderFields(org.refcodes.web.RequestHeaderFields aHeaderFields) |
|
void |
setHttpMethod(org.refcodes.web.HttpMethod aHttpMethod) |
|
void |
setUrl(org.refcodes.web.Url aUrl) |
|
RestResponse |
toRestResponse() |
Sends the request and returns synchronously the according
RestResponse . |
String |
toString() |
letHeaderFields
getRequest, setRequest, toHttpBody
getRedirectDepth, getRequest, setRedirectDepth, setRequest, toHttpBody
letHttpMethod
withAddToHeaderFields, withAddToHeaderFields, withAddToHeaderFields, withAddToHeaderFields, withAddToHeaderFields, withAddToQueryFields, withAddToQueryFields, withAddToQueryFields
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setRedirectDepth
letRedirectDepth
build, withHeaderFields, withHttpMethod, withRedirectDepth, withRequest, withUrl
protected RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod, org.refcodes.web.Url aUrl, org.refcodes.web.RequestHeaderFields aHeaderFields, Object aRequest, RestClient aRestClient)
aHttpMethod
- the http methodaUrl
- The Url
from which to take the URL specific data.aHeaderFields
- the Header-FieldsaRequest
- the requestaRestClient
- the rest clientprotected RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod, org.refcodes.web.Url aUrl, RestClient aRestClient)
aHttpMethod
- the http methodaUrl
- The Url
from which to take the URL specific data.aRestClient
- the rest clientprotected RestRequestBuilderImpl(RestClient aRestClient)
aRestClient
- the rest clientprotected RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod, org.refcodes.web.Url aUrl, Object aRequest, RestClient aRestClient)
aHttpMethod
- the http methodaUrl
- The Url
from which to take the URL specific data.aRequest
- the requestaRestClient
- the rest clientprotected RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod, org.refcodes.web.Url aUrl, int aRedirectDepth, RestClient aRestClient)
aHttpMethod
- the http methodaUrl
- The Url
from which to take the URL specific data.aRedirectDepth
- The redirect depth provides the count of
HTTP-Request and HTTP-Response cycles where the response
represents a redirect as of
HttpStatusCode.isRedirectStatus()
. A value of -1
represents the default behavior, e.g. using
HttpURLConnection
's redirection means.aRestClient
- the rest clientprotected RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod, org.refcodes.web.Url aUrl, Object aRequest, int aRedirectDepth, RestClient aRestClient)
aHttpMethod
- the http methodaUrl
- The Url
from which to take the URL specific data.aRequest
- the requestaRedirectDepth
- The redirect depth provides the count of
HTTP-Request and HTTP-Response cycles where the response
represents a redirect as of
HttpStatusCode.isRedirectStatus()
. A value of -1
represents the default behavior, e.g. using
HttpURLConnection
's redirection means.aRestClient
- the rest clientprotected RestRequestBuilderImpl(org.refcodes.web.HttpMethod aHttpMethod, org.refcodes.web.Url aUrl, org.refcodes.web.RequestHeaderFields aHeaderFields, Object aRequest, int aRedirectDepth, RestClient aRestClient)
aHttpMethod
- the http methodaUrl
- The Url
from which to take the URL specific data.aHeaderFields
- the Header-FieldsaRequest
- the requestaRedirectDepth
- The redirect depth provides the count of
HTTP-Request and HTTP-Response cycles where the response
represents a redirect as of
HttpStatusCode.isRedirectStatus()
. A value of -1
represents the default behavior, e.g. using
HttpURLConnection
's redirection means.aRestClient
- the rest clientpublic org.refcodes.web.Url.UrlBuilder getUrl()
getUrl
in interface org.refcodes.web.UrlAccessor
getUrl
in class org.refcodes.web.HttpRequestImpl
public void setUrl(org.refcodes.web.Url aUrl)
setUrl
in interface org.refcodes.web.UrlAccessor.UrlMutator
public org.refcodes.web.HttpMethod getHttpMethod()
getHttpMethod
in interface org.refcodes.web.HttpMethodAccessor
getHttpMethod
in class org.refcodes.web.HttpRequestImpl
public void setHttpMethod(org.refcodes.web.HttpMethod aHttpMethod)
setHttpMethod
in interface org.refcodes.web.HttpMethodAccessor.HttpMethodMutator
public String toString()
toString
in class org.refcodes.web.HttpClientRequestImpl
public void setHeaderFields(org.refcodes.web.RequestHeaderFields aHeaderFields)
setHeaderFields
in interface org.refcodes.web.HeaderFieldsAccessor.HeaderFieldsMutator<org.refcodes.web.RequestHeaderFields>
public RestResponse toRestResponse() throws org.refcodes.web.HttpResponseException
RestResponse
.toRestResponse
in interface RestRequestBuilder
org.refcodes.web.HttpResponseException
- the http response exceptionCopyright © 2021. All rights reserved.