public class HttpClient extends BaseObject implements IhttpClient, ISupportInitialize, ISupportLogging
| Modifier and Type | Field and Description |
|---|---|
private character |
clientName
Client name.
|
private character |
clientVersion
Client version.
|
protected static java.lang.String |
ICLIENTLIBRARY |
private object<? extends IHttpClientLibrary> |
library
Client library.
|
private object<? extends IlogWriter> |
logger
Logger
|
private object<? extends ClientOptions> |
options
Client options.
|
CLIENTOPTIONS, IHTTPREQUEST, IHTTPRESPONSE| Constructor and Description |
|---|
HttpClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
__net_http_HttpClient_constructor__(character _pcClientName,
character _pcClientVersion,
object<? extends IHttpClientLibrary> _poLibrary)
Constructor.
|
static void |
__net_http_HttpClient_constructor__static__() |
void |
__net_http_HttpClient_destructor__() |
void |
__net_http_HttpClient_execute__()
Execute method.
|
private void |
_addAuthentication(object<? extends IhttpRequest> _poRequest,
object<? extends IAuthenticatedRequest> authRequest) |
private void |
_copyCookies(IhttpMessage source,
IhttpMessage target,
object<? extends Cookie>[][] oCookies)
Helper method to copy/transfer cookies from one message to another (usually from response to request)
|
protected void |
addUserAgent(object<? extends IhttpRequest> _p1) |
void |
destroy()
Destroy.
|
object<? extends IhttpResponse> |
execute(object<? extends IhttpRequest> _poRequest)
Execute HTTP request.
|
void |
execute(object<? extends IhttpRequest> _poRequest,
object<? extends IhttpResponse> _poResponse)
Execute HTTP request.
|
character |
getClientName()
Get client name.
|
character |
getClientVersion()
Get client version.
|
object<? extends IlogWriter> |
getLogger()
Get logger.
|
object<? extends ClientOptions> |
getOptions()
Get client options.
|
void |
initialize()
Initialize
|
static object<? extends HttpClient> |
instance() |
protected logical |
processStatusAction(object<? extends IhttpRequest> poRequest,
object<? extends IhttpResponse> poResponse)
Process HttpResponse status code.
|
void |
setLogger(object<? extends IlogWriter> _logger)
Set logger.
|
__isValidInternal__, __lang_BaseObject_constructor__, __setValidInternal__, assertNotNull, assertNotNull, getLegacyClass, getNextSibling, getPrevSibling, legacyClone, legacyEquals, toLegacyStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait__isValidInternal__, __lang_BaseObject_constructor__, __setValidInternal__, getLegacyClass, getNextSibling, getPrevSibling, isTracked, legacyClone, legacyEquals, toLegacyStringprotected static final java.lang.String ICLIENTLIBRARY
private final character clientName
private final character clientVersion
private final object<? extends ClientOptions> options
private final object<? extends IHttpClientLibrary> library
private final object<? extends IlogWriter> logger
public void destroy()
destroy in interface ISupportInitializepublic void initialize()
initialize in interface ISupportInitializepublic void __net_http_HttpClient_constructor__(character _pcClientName, character _pcClientVersion, object<? extends IHttpClientLibrary> _poLibrary)
_pcClientName - client name._pcClientVersion - client version._poLibrary - client library.public static void __net_http_HttpClient_constructor__static__()
public void __net_http_HttpClient_destructor__()
public void __net_http_HttpClient_execute__()
protected void addUserAgent(object<? extends IhttpRequest> _p1)
public object<? extends IlogWriter> getLogger()
getLogger in interface ISupportLoggingpublic void setLogger(object<? extends IlogWriter> _logger)
setLogger in interface ISupportLogging_logger - The logger instance to be used by the client.public object<? extends IhttpResponse> execute(object<? extends IhttpRequest> _poRequest)
execute in interface IhttpClient_poRequest - HTTP request.public static object<? extends HttpClient> instance()
public void execute(object<? extends IhttpRequest> _poRequest, object<? extends IhttpResponse> _poResponse)
execute in interface IhttpClient_poRequest - HTTP request._poResponse - HTTP Response.private void _addAuthentication(object<? extends IhttpRequest> _poRequest, object<? extends IAuthenticatedRequest> authRequest)
protected logical processStatusAction(object<? extends IhttpRequest> poRequest, object<? extends IhttpResponse> poResponse)
poRequest - HTTP request.poResponse - HTTP Response.public character getClientName()
getClientName in interface IhttpClientpublic character getClientVersion()
getClientVersion in interface IhttpClientpublic object<? extends ClientOptions> getOptions()
getOptions in interface IhttpClientprivate void _copyCookies(IhttpMessage source, IhttpMessage target, object<? extends Cookie>[][] oCookies)
source - the message to copy cookies fromtarget - the message to copy cookies into