public abstract class ClientBuilder extends ConfigBuilder
ConfigBuilder.OptionTypeHelper<T>, ConfigBuilder.OptionValueHolder
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CLIENTBUILDER |
protected static java.lang.String |
ICOOKIEJAR |
protected static java.lang.String |
IHTTPCLIENT |
protected static java.lang.String |
IHTTPCLIENTLIBRARY |
protected static java.lang.String |
ILOGWRITER |
protected static java.lang.String |
LANG_CLASS |
protected static java.lang.String |
NET_URI |
private character |
propClientName
Properties
|
private character |
propClientVersion |
private static ContextLocal<object<? extends BuilderRegistry>> |
registry
Registry property
|
options
Constructor and Description |
---|
ClientBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
__net_http_ClientBuilder_constructor__()
Constructor
|
static void |
__net_http_ClientBuilder_constructor__static__()
Static Constructor
|
void |
__net_http_ClientBuilder_execute__()
Execute method
|
static object<? extends ClientBuilder> |
build()
Builder director method.
|
protected object<? extends IHttpClientLibrary> |
buildLibrary()
Helper method to build a http client library
|
static object<? extends IhttpClient> |
decorateClient(object<? extends LegacyClass> p1,
object<? extends IhttpClient> p2)
Decorate the client with additional behaviour.
|
abstract object<? extends IhttpClient> |
getClient()
Return a configured client
|
protected character |
getPropClientName()
Get client name property.
|
protected character |
getPropClientVersion()
Get client version property.
|
static object<? extends BuilderRegistry> |
getRegistry()
Get registry.
|
private static void |
initializeRegistry(object<? extends BuilderRegistry> _poRegistry)
Initialize registry.
|
object<? extends ClientBuilder> |
keepCookies()
Uses a default cookie for managing cookies.
|
object<? extends ClientBuilder> |
keepCookies(object<? extends ICookieJar> _p1)
Uses a default cookie for managing cookies.
|
object<? extends ClientBuilder> |
named(character _p1,
character _p2)
Sets the client name and version.
|
object<? extends ClientBuilder> |
setNumRetries(integer _p1)
Sets the value of the NumRetries option.
|
object<? extends ClientBuilder> |
setRequestTimeout(decimal _p1)
Sets the value of the RequestTimeout option.
|
object<? extends ClientBuilder> |
setRetryPause(decimal _p1)
Sets the value of the PauseBetweenRetry option.
|
object<? extends ClientBuilder> |
usingLibrary(object<? extends IHttpClientLibrary> _p1)
Override the default client library to be used with this http client.
|
object<? extends ClientBuilder> |
usingLogger(object<? extends IlogWriter> _p1)
Override the default log writer to be used with this http client.
|
object<? extends ClientBuilder> |
viaProxy(character _p1)
Sets the URI to use as a proxy server for all requests.
|
object<? extends ClientBuilder> |
viaProxy(object<? extends Uri> _p1)
Sets the URI to use as a proxy server for all requests.
|
__net_http_ConfigBuilder_constructor__, __net_http_ConfigBuilder_execute__
__core_util_ConfigBuilder_constructor__, __core_util_ConfigBuilder_execute__, _hasOption, appendArrayCharacterValue, clearOptions, getOptionDateTimeValue, getOptionLogicalValue, getOptionLongcharValue, getOptionNumericValue, getOptionObjectValue, getOptionStringArrayValue, getOptionStringValue, hasOption, removeOption, setOption, setOption, setOption, setOption, setOption, setOption, setOption
__lang_BaseObject_constructor__, __lang_BaseObject_execute__, assertNotNull, assertNotNull, clone, getLegacyClass, getNextSibling, getPrevSibling, legacyEquals, toLegacyString
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isTracked
protected static final java.lang.String LANG_CLASS
protected static final java.lang.String NET_URI
protected static final java.lang.String ILOGWRITER
protected static final java.lang.String IHTTPCLIENT
protected static final java.lang.String CLIENTBUILDER
protected static final java.lang.String ICOOKIEJAR
protected static final java.lang.String IHTTPCLIENTLIBRARY
private character propClientName
private character propClientVersion
private static ContextLocal<object<? extends BuilderRegistry>> registry
public void __net_http_ClientBuilder_execute__()
public void __net_http_ClientBuilder_constructor__()
public static void __net_http_ClientBuilder_constructor__static__()
public static object<? extends ClientBuilder> build()
protected object<? extends IHttpClientLibrary> buildLibrary()
public static object<? extends IhttpClient> decorateClient(object<? extends LegacyClass> p1, object<? extends IhttpClient> p2)
p1
- The type of decorator to use.p2
- The client/instance we're decorating.private static void initializeRegistry(object<? extends BuilderRegistry> _poRegistry)
_poRegistry
- the registry to be initialized.public static object<? extends BuilderRegistry> getRegistry()
protected character getPropClientName()
protected character getPropClientVersion()
public abstract object<? extends IhttpClient> getClient()
public object<? extends ClientBuilder> keepCookies()
public object<? extends ClientBuilder> keepCookies(object<? extends ICookieJar> _p1)
_p1
- ICookieJar The cookie jar which manages cookies for this clientpublic object<? extends ClientBuilder> named(character _p1, character _p2)
_p1
- The client name._p2
- The client version (semantic version: major.minor.patch).public object<? extends ClientBuilder> setNumRetries(integer _p1)
_p1
- The value of the NumRetries option.public object<? extends ClientBuilder> setRequestTimeout(decimal _p1)
_p1
- The value of the RequestTimeout option.public object<? extends ClientBuilder> setRetryPause(decimal _p1)
_p1
- The value of the PauseBetweenRetry option.public object<? extends ClientBuilder> usingLibrary(object<? extends IHttpClientLibrary> _p1)
_p1
- IHttpClientLibrary The library to be usedpublic object<? extends ClientBuilder> usingLogger(object<? extends IlogWriter> _p1)
_p1
- The log writer to be usedpublic object<? extends ClientBuilder> viaProxy(character _p1)
_p1
- The proxy server URI.public object<? extends ClientBuilder> viaProxy(object<? extends Uri> _p1)
_p1
- The proxy server URI.