public interface RestCallerBuilder extends RestCaller, org.refcodes.net.HttpRequestBuilder<RestCallerBuilder>, org.refcodes.mixin.LocatorAccessor.LocatorProperty<String>, org.refcodes.mixin.LocatorAccessor.LocatorBuilder<String,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.QueryFieldsAccessor.QueryFieldsBuilder<RestCallerBuilder>, 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 LocatorAccessor.getLocator()
property.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<?,?>>
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>>
onResponse
getRequest, setRequest, toHttpBody
setQueryFields
setHeaderFields
withAddToHeaderFields, withAddToHeaderFields, withAddToHeaderFields, withAddToHeaderFields, withAddToHeaderFields, withAddToQueryFields, withAddToQueryFields, withAddToQueryFields
default RestCallerBuilder withQueryFields(org.refcodes.net.FormFields aQueryFields)
withQueryFields
in interface org.refcodes.net.QueryFieldsAccessor.QueryFieldsBuilder<RestCallerBuilder>
default RestCallerBuilder withLocator(String aLocator)
withLocator
in interface org.refcodes.mixin.LocatorAccessor.LocatorBuilder<String,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 withCloseQuetly()
withCloseQuetly
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 © 2017. All rights reserved.