public class RestRequestBuilderImpl extends org.refcodes.net.HttpClientRequestImpl implements RestRequestBuilder
RestCallerBuilder
interface as good old
POJO for use by different RestClient
implementations.org.refcodes.net.UrlAccessor.UrlBuilder<URL extends org.refcodes.net.Url,B extends org.refcodes.net.UrlAccessor.UrlBuilder<URL,B>>, org.refcodes.net.UrlAccessor.UrlMutator<URL extends org.refcodes.net.Url>, org.refcodes.net.UrlAccessor.UrlProperty<URL extends org.refcodes.net.Url>
org.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<B extends org.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<B>>, org.refcodes.net.HttpMethodAccessor.HttpMethodMutator, org.refcodes.net.HttpMethodAccessor.HttpMethodProperty
org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsBuilder<T extends org.refcodes.net.HeaderFields<?,?>,B extends org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsMutator<T extends org.refcodes.net.HeaderFields<?,?>>, org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsProperty<T extends org.refcodes.net.HeaderFields<?,?>>
Modifier | Constructor and Description |
---|---|
protected |
RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod,
org.refcodes.net.Url aUrl,
Object aRequest,
RestClient aRestClient)
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod,
org.refcodes.net.Url aUrl,
org.refcodes.net.RequestHeaderFields aHeaderFields,
Object aRequest,
RestClient aRestClient)
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod,
org.refcodes.net.Url aUrl,
RestClient aRestClient)
Instantiates a new rest request builder impl.
|
Modifier and Type | Method and Description |
---|---|
org.refcodes.net.HttpMethod |
getHttpMethod() |
org.refcodes.net.Url.UrlBuilder |
getUrl() |
void |
setHeaderFields(org.refcodes.net.RequestHeaderFields aHeaderFields) |
void |
setHttpMethod(org.refcodes.net.HttpMethod aHttpMethod) |
void |
setUrl(org.refcodes.net.Url.UrlBuilder aUrl) |
RestResponse |
toRestResponse()
Sends the request and returns synchronously the according
RestResponse . |
String |
toString() |
getRequest, setRequest, toHttpBody
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
withHeaderFields, withHttpMethod, withRequest, withUrl
protected RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.net.RequestHeaderFields aHeaderFields, Object aRequest, RestClient aRestClient)
aHttpMethod
- the a http methodaUrl
- The Url
from which to take the URL specific data.aHeaderFields
- the a Header-FieldsaRequest
- the a requestaRestClient
- the a rest clientprotected RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, RestClient aRestClient)
aHttpMethod
- the a http methodaUrl
- The Url
from which to take the URL specific data.aRestClient
- the a rest clientprotected RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, Object aRequest, RestClient aRestClient)
aHttpMethod
- the a http methodaUrl
- The Url
from which to take the URL specific data.aRequest
- the a requestaRestClient
- the a rest clientpublic org.refcodes.net.Url.UrlBuilder getUrl()
getUrl
in interface org.refcodes.net.HttpRequestBuilder<RestRequestBuilder>
getUrl
in interface org.refcodes.net.UrlAccessor<org.refcodes.net.Url>
getUrl
in class org.refcodes.net.HttpRequestImpl
public void setUrl(org.refcodes.net.Url.UrlBuilder aUrl)
setUrl
in interface org.refcodes.net.UrlAccessor.UrlMutator<org.refcodes.net.Url.UrlBuilder>
public org.refcodes.net.HttpMethod getHttpMethod()
getHttpMethod
in interface org.refcodes.net.HttpMethodAccessor
getHttpMethod
in class org.refcodes.net.HttpRequestImpl
public void setHttpMethod(org.refcodes.net.HttpMethod aHttpMethod)
setHttpMethod
in interface org.refcodes.net.HttpMethodAccessor.HttpMethodMutator
public void setHeaderFields(org.refcodes.net.RequestHeaderFields aHeaderFields)
setHeaderFields
in interface org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsMutator<org.refcodes.net.RequestHeaderFields>
public RestResponse toRestResponse() throws org.refcodes.net.HttpResponseException
RestResponse
.toRestResponse
in interface RestRequestBuilder
org.refcodes.net.HttpResponseException
- the http response exceptionCopyright © 2018. All rights reserved.