public interface RestCallerBuilder extends RestCaller, org.refcodes.net.HttpRequestBuilder<RestCallerBuilder>, org.refcodes.net.HttpMethodAccessor.HttpMethodProperty, org.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<RestCallerBuilder>, org.refcodes.component.LinkComponent.LinkComponentBuilder<RestCallerBuilder>, org.refcodes.component.ConnectionStatusAccessor, org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsBuilder<org.refcodes.net.RequestHeaderFields,RestCallerBuilder>
RestCallerBuilder
extends an RestCaller
with builder
functionality and adds lambda
support for handling the responses
addressed to this RestCaller
. The lambda
defined as
RestResponseObserver
acts as the single listener to this
RestCaller
responsible for handling the responses for which this
RestCaller
is responsible.
The locator to which a RestCallerBuilder
targets for is defined by
the UrlAccessor.getUrl()
property.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<?,?>>
org.refcodes.net.QueryFieldsAccessor.QueryFieldsBuilder<B extends org.refcodes.net.QueryFieldsAccessor.QueryFieldsBuilder<?>>, org.refcodes.net.QueryFieldsAccessor.QueryFieldsMutator, org.refcodes.net.QueryFieldsAccessor.QueryFieldsProperty
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>
Modifier and Type | Method and Description |
---|---|
default org.refcodes.net.FormFields |
getQueryFields() |
RestResponseObserver |
getResponseObserver()
Retrieves the
RestResponseObserver to which any responses are
delegated upon invocation of the RestResponseObserver.onResponse(RestResponseEvent)
method. |
default void |
setQueryFields(org.refcodes.net.FormFields aQueryFields) |
void |
setResponseObserver(RestResponseObserver aLambda)
Sets the
RestResponseObserver to which any responses are
delegated upon invocation of the RestResponseObserver.onResponse(RestResponseEvent)
method. |
default RestCallerBuilder |
withClose() |
default RestCallerBuilder |
withCloseIn(int aCloseInMillis) |
default RestCallerBuilder |
withCloseQuietly() |
default RestCallerBuilder |
withHeaderFields(org.refcodes.net.RequestHeaderFields aRequestHeaderFields) |
default RestCallerBuilder |
withHttpMethod(org.refcodes.net.HttpMethod aHttpMethod) |
default RestCallerBuilder |
withOpen() |
default <REQ> RestCallerBuilder |
withRequest(REQ aRequest) |
default RestCallerBuilder |
withResponseObserver(RestResponseObserver aLambda)
Builder method for setting the
RestResponseObserver . |
default RestCallerBuilder |
withUrl(org.refcodes.net.Url.UrlBuilder aUrl) |
onResponse
getRequest, setRequest, toHttpBody
setHeaderFields
getUrl, withAddToHeaderFields, withAddToHeaderFields, withAddToHeaderFields, withAddToHeaderFields, withAddToHeaderFields, withAddToQueryFields, withAddToQueryFields, withAddToQueryFields
setHttpMethod
default void setQueryFields(org.refcodes.net.FormFields aQueryFields)
setQueryFields
in interface org.refcodes.net.QueryFieldsAccessor.QueryFieldsMutator
default org.refcodes.net.FormFields getQueryFields()
getQueryFields
in interface org.refcodes.net.QueryFieldsAccessor
default RestCallerBuilder withUrl(org.refcodes.net.Url.UrlBuilder aUrl)
withUrl
in interface org.refcodes.net.UrlAccessor.UrlBuilder<org.refcodes.net.Url.UrlBuilder,org.refcodes.net.HttpRequestBuilder<RestCallerBuilder>>
default RestCallerBuilder withHttpMethod(org.refcodes.net.HttpMethod aHttpMethod)
withHttpMethod
in interface org.refcodes.net.HttpMethodAccessor.HttpMethodBuilder<RestCallerBuilder>
default <REQ> RestCallerBuilder withRequest(REQ aRequest)
withRequest
in interface org.refcodes.net.HttpClientRequest
RestResponseObserver getResponseObserver()
RestResponseObserver
to which any responses are
delegated upon invocation of the RestResponseObserver.onResponse(RestResponseEvent)
method.RestResponseObserver
to handle
responses.void setResponseObserver(RestResponseObserver aLambda)
RestResponseObserver
to which any responses are
delegated upon invocation of the RestResponseObserver.onResponse(RestResponseEvent)
method.aLambda
- The (user defined) RestResponseObserver
to handle
responses, feel free to code it as lambda
expression!default RestCallerBuilder withResponseObserver(RestResponseObserver aLambda)
RestResponseObserver
.aLambda
- The (user defined) RestResponseObserver
to handle
responses, feel free to code it as lambda
expressionRestCallerBuilder
for the sake of a fluent API.default RestCallerBuilder withHeaderFields(org.refcodes.net.RequestHeaderFields aRequestHeaderFields)
withHeaderFields
in interface org.refcodes.net.HeaderFieldsAccessor.HeaderFieldsBuilder<org.refcodes.net.RequestHeaderFields,RestCallerBuilder>
default RestCallerBuilder withOpen() throws org.refcodes.component.OpenException
withOpen
in interface org.refcodes.component.Openable.OpenBuilder<org.refcodes.component.LinkComponent.LinkComponentBuilder<RestCallerBuilder>>
org.refcodes.component.OpenException
default RestCallerBuilder withClose() throws org.refcodes.component.CloseException
withClose
in interface org.refcodes.component.Closable.CloseBuilder<org.refcodes.component.LinkComponent.LinkComponentBuilder<RestCallerBuilder>>
org.refcodes.component.CloseException
default RestCallerBuilder withCloseQuietly()
withCloseQuietly
in interface org.refcodes.component.Closable.CloseBuilder<org.refcodes.component.LinkComponent.LinkComponentBuilder<RestCallerBuilder>>
default RestCallerBuilder withCloseIn(int aCloseInMillis)
withCloseIn
in interface org.refcodes.component.Closable.CloseBuilder<org.refcodes.component.LinkComponent.LinkComponentBuilder<RestCallerBuilder>>
Copyright © 2018. All rights reserved.