public class J4pClient extends J4pClientBuilderFactory
| Constructor and Description |
|---|
J4pClient(String pJ4pServerUrl)
Construct a new client for a given server url
|
J4pClient(String pJ4pServerUrl,
org.apache.http.client.HttpClient pHttpClient)
Constructor for a given agent URl and a given HttpClient
|
J4pClient(String pJ4pServerUrl,
org.apache.http.client.HttpClient pHttpClient,
J4pTargetConfig pTargetConfig)
Constructor using a given Agent URL, HttpClient and a proxy target config.
|
| Modifier and Type | Method and Description |
|---|---|
<R extends J4pResponse<T>,T extends J4pRequest> |
execute(List<T> pRequests)
Execute multiple requests at once.
|
<R extends J4pResponse<T>,T extends J4pRequest> |
execute(List<T> pRequests,
Map<J4pQueryParameter,String> pProcessingOptions)
Execute multiple requests at once.
|
<R extends J4pResponse<T>,T extends J4pRequest> |
execute(T... pRequests)
Execute multiple requests at once.
|
<R extends J4pResponse<T>,T extends J4pRequest> |
execute(T pRequest)
Execute a single J4pRequest returning a single response.
|
<R extends J4pResponse<T>,T extends J4pRequest> |
execute(T pRequest,
Map<J4pQueryParameter,String> pProcessingOptions)
Execute a single J4pRequest returning a single response.
|
<R extends J4pResponse<T>,T extends J4pRequest> |
execute(T pRequest,
String pMethod)
Execute a single J4pRequest which returns a single response.
|
<R extends J4pResponse<T>,T extends J4pRequest> |
execute(T pRequest,
String pMethod,
Map<J4pQueryParameter,String> pProcessingOptions)
Execute a single J4pRequest which returns a single response.
|
org.apache.http.client.HttpClient |
getHttpClient()
Expose the embedded
HttpClient for tuning connection parameters. |
URI |
getUri()
Get base URL for Jolokia requests
|
authenticator, connectionTimeout, contentCharset, cookieStore, expectContinue, maxConnectionPoolTimeout, maxTotalConnections, password, pooledConnections, singleConnection, socketBufferSize, socketTimeout, tcpNoDelay, url, userpublic J4pClient(String pJ4pServerUrl)
pJ4pServerUrl - the agent URL for how to contact the server.public J4pClient(String pJ4pServerUrl, org.apache.http.client.HttpClient pHttpClient)
pJ4pServerUrl - the agent URL for how to contact the server.pHttpClient - HTTP client to use for the connecting to the agentpublic J4pClient(String pJ4pServerUrl, org.apache.http.client.HttpClient pHttpClient, J4pTargetConfig pTargetConfig)
pJ4pServerUrl - the agent URL for how to contact the server.pHttpClient - HTTP client to use for the connecting to the agentpTargetConfig - optional targetpublic <R extends J4pResponse<T>,T extends J4pRequest> R execute(T pRequest) throws J4pException
R - response typeT - request typepRequest - request to executeJ4pExceptionpublic <R extends J4pResponse<T>,T extends J4pRequest> R execute(T pRequest, Map<J4pQueryParameter,String> pProcessingOptions) throws J4pException
R - response typeT - request typepRequest - request to executepProcessingOptions - optional map of processing optionsIOException - when the execution failsorg.json.simple.parser.ParseException - if parsing of the JSON answer failsJ4pExceptionpublic <R extends J4pResponse<T>,T extends J4pRequest> R execute(T pRequest, String pMethod) throws J4pException
R - response typeT - request typepRequest - request to executepMethod - method to use which should be either "GET" or "POST"J4pException - if something's wrong (e.g. connection failed or read timeout)public <R extends J4pResponse<T>,T extends J4pRequest> R execute(T pRequest, String pMethod, Map<J4pQueryParameter,String> pProcessingOptions) throws J4pException
R - response typeT - request typepRequest - request to executepMethod - method to use which should be either "GET" or "POST"pProcessingOptions - optional map of processiong optionsJ4pException - if something's wrong (e.g. connection failed or read timeout)public <R extends J4pResponse<T>,T extends J4pRequest> List<R> execute(List<T> pRequests) throws J4pException
R - response typeT - request typepRequests - requests to executeJ4pException - when an communication error occurspublic <R extends J4pResponse<T>,T extends J4pRequest> List<R> execute(List<T> pRequests, Map<J4pQueryParameter,String> pProcessingOptions) throws J4pException
R - response typeT - request typepRequests - requests to executepProcessingOptions - processing options to useJ4pException - when an communication error occurspublic <R extends J4pResponse<T>,T extends J4pRequest> List<R> execute(T... pRequests) throws J4pException
R - response typexT - request typepRequests - requests to executeJ4pException - when an communication error occurspublic org.apache.http.client.HttpClient getHttpClient()
HttpClient for tuning connection parameters.public URI getUri()
Copyright © 2014. All rights reserved.