public class RestRequestBuilderImpl extends org.refcodes.net.HttpClientRequestImpl implements RestRequestBuilder
RestCallerBuilder
interface as good old
POJO for use by different RestClient
implementations.org.refcodes.mixin.LocatorAccessor.LocatorBuilder<T,B extends org.refcodes.mixin.LocatorAccessor.LocatorBuilder<T,B>>, org.refcodes.mixin.LocatorAccessor.LocatorMutator<T>, org.refcodes.mixin.LocatorAccessor.LocatorProperty<T>
org.refcodes.net.QueryFieldsAccessor.QueryFieldsBuilder<B extends org.refcodes.net.QueryFieldsAccessor.QueryFieldsBuilder<?>>, org.refcodes.net.QueryFieldsAccessor.QueryFieldsMutator, org.refcodes.net.QueryFieldsAccessor.QueryFieldsProperty
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,
String aLocator,
org.refcodes.net.FormFields aQueryFields,
Object aRequest,
RestClient aRestClient)
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod,
String aLocator,
org.refcodes.net.FormFields aQueryFields,
org.refcodes.net.RequestHeaderFields aHeaderFields,
Object aRequest,
RestClient aRestClient)
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod,
String aLocator,
org.refcodes.net.FormFields aQueryFields,
RestClient aRestClient)
Instantiates a new rest request builder impl.
|
protected |
RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod,
String aLocator,
Object aRequest,
RestClient aRestClient)
Instantiates a new rest request builder impl.
|
Modifier and Type | Method and Description |
---|---|
org.refcodes.net.HttpMethod |
getHttpMethod() |
String |
getLocator() |
void |
setHeaderFields(org.refcodes.net.RequestHeaderFields aHeaderFields) |
void |
setHttpMethod(org.refcodes.net.HttpMethod aHttpMethod) |
void |
setLocator(String aLocator) |
void |
setQueryFields(org.refcodes.net.FormFields aQueryFields) |
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, withLocator, withQueryFields, withRequest
protected RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod, String aLocator, org.refcodes.net.FormFields aQueryFields, org.refcodes.net.RequestHeaderFields aHeaderFields, Object aRequest, RestClient aRestClient)
aHttpMethod
- the a http methodaLocator
- the a locatoraQueryFields
- the a query fieldsaHeaderFields
- the a Header-FieldsaRequest
- the a requestaRestClient
- the a rest clientprotected RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod, String aLocator, org.refcodes.net.FormFields aQueryFields, RestClient aRestClient)
aHttpMethod
- the a http methodaLocator
- the a locatoraQueryFields
- the a query fieldsaRestClient
- the a rest clientprotected RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod, String aLocator, Object aRequest, RestClient aRestClient)
aHttpMethod
- the a http methodaLocator
- the a locatoraRequest
- the a requestaRestClient
- the a rest clientprotected RestRequestBuilderImpl(org.refcodes.net.HttpMethod aHttpMethod, String aLocator, org.refcodes.net.FormFields aQueryFields, Object aRequest, RestClient aRestClient)
aHttpMethod
- the a http methodaLocator
- the a locatoraQueryFields
- the a query fieldsaRequest
- the a requestaRestClient
- the a rest clientpublic String getLocator()
getLocator
in interface org.refcodes.mixin.LocatorAccessor<String>
getLocator
in class org.refcodes.net.HttpRequestImpl
public org.refcodes.net.HttpMethod getHttpMethod()
getHttpMethod
in interface org.refcodes.net.HttpMethodAccessor
getHttpMethod
in class org.refcodes.net.HttpRequestImpl
public void setLocator(String aLocator)
setLocator
in interface org.refcodes.mixin.LocatorAccessor.LocatorMutator<String>
public void setHttpMethod(org.refcodes.net.HttpMethod aHttpMethod)
setHttpMethod
in interface org.refcodes.net.HttpMethodAccessor.HttpMethodMutator
public void setQueryFields(org.refcodes.net.FormFields aQueryFields)
setQueryFields
in interface org.refcodes.net.QueryFieldsAccessor.QueryFieldsMutator
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 © 2017. All rights reserved.