public class RestClientService extends AbstractRestClientService
IRemoteService.AbstractClientService.AsyncResult, AbstractClientService.UriRequestAbstractRemoteService.AsyncArgs, AbstractRemoteService.ProxyClassLoader| Modifier and Type | Field and Description |
|---|---|
static int |
connectRequestTimeout |
static int |
connectTimeout |
protected static String |
DEFAULT_HTTP_CONTENT_CHARSET |
protected static int |
DEFAULT_RESPONSE_BUFFER_SIZE |
protected org.apache.http.client.HttpClient |
httpClient |
protected int |
responseBufferSize |
static int |
socketTimeout |
container, registrationEMPTY_ARGS, futureExecutorService, futureExecutorServiceMaxThreads, iFutureExecutor| Constructor and Description |
|---|
RestClientService(RestClientContainer container,
RemoteServiceClientRegistration registration) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRequestHeaders(org.apache.http.message.AbstractHttpMessage httpMethod,
IRemoteCall call,
IRemoteCallable callable) |
protected org.apache.http.client.methods.HttpRequestBase |
createAndPrepareHttpMethod(AbstractClientService.UriRequest request) |
protected org.apache.http.client.methods.HttpRequestBase |
createAndPrepareHttpMethod(String uri,
IRemoteCall call,
IRemoteCallable callable) |
protected org.apache.http.client.methods.HttpDelete |
createDeleteMethod(String uri) |
protected org.apache.http.client.methods.HttpGet |
createGetMethod(String uri) |
protected org.apache.http.client.HttpClient |
createHttpClient() |
protected org.apache.http.client.methods.HttpPatch |
createPatchMethod(String uri) |
protected org.apache.http.client.methods.HttpPost |
createPostMethod(String uri) |
protected org.apache.http.client.methods.HttpPut |
createPutMethod(String uri) |
protected byte[] |
getResponseAsBytes(org.apache.http.HttpResponse response) |
protected org.apache.http.client.entity.UrlEncodedFormEntity |
getUrlEncodedFormEntity(List list,
AbstractEntityRequestType postRequestType) |
protected Object |
invokeRemoteCall(IRemoteCall call,
IRemoteCallable callable)
Calls the Rest service with given URL of IRestCall.
|
protected org.apache.http.client.methods.HttpRequestBase |
prepareDeleteMethod(String uri,
IRemoteCall call,
IRemoteCallable callable) |
protected org.apache.http.client.methods.HttpRequestBase |
prepareGetMethod(String uri,
IRemoteCall call,
IRemoteCallable callable) |
protected void |
prepareHttpMethod(org.apache.http.client.methods.HttpRequestBase httpMethod,
IRemoteCall call,
IRemoteCallable callable) |
protected org.apache.http.client.methods.HttpRequestBase |
preparePatchMethod(String uri,
IRemoteCall call,
IRemoteCallable callable) |
protected org.apache.http.client.methods.HttpRequestBase |
preparePostMethod(String uri,
IRemoteCall call,
IRemoteCallable callable) |
protected org.apache.http.client.methods.HttpRequestBase |
preparePutMethod(String uri,
IRemoteCall call,
IRemoteCallable callable) |
protected boolean |
retrieveErrorResponseBody(org.apache.http.HttpResponse response) |
protected void |
setupAuthenticaton(org.apache.http.client.HttpClient httpClient,
org.apache.http.client.methods.HttpRequestBase method) |
protected void |
setupHttpMethod(org.apache.http.client.methods.HttpRequestBase httpMethod,
IRemoteCall call,
IRemoteCallable callable) |
protected void |
setupTimeouts(org.apache.http.client.HttpClient httpClient,
IRemoteCall call,
IRemoteCallable callable) |
protected org.apache.http.NameValuePair[] |
toNameValuePairs(String uri,
IRemoteCall call,
IRemoteCallable callable) |
handleException, handleException, logException, logWarning, tracecallAsync, callAsync, callAsync, callAsync, callSync, createUriRequest, fireAsync, getCallMethodNameForProxyInvoke, getCallParametersForProxyInvoke, getClientContainer, getInterfaceClassNames, getNextRequestID, getRegistration, getRemoteServiceID, getRemoteServiceReference, handleInvokeException, invokeSync, prepareEndpointAddress, prepareParameters, processResponseaddAsyncProxyClasses, addRemoteServiceProxyToProxy, callAsync, callAsync, callAsyncWithResult, callAsyncWithTimeout, callAsyncWithTimeout, callCompletableAsync, callFutureAsync, callFutureAsync, callSync, convertInterfaceNameToAsyncInterfaceName, createProxy, createProxy, createRCCE, createRCCEFailure, createRCCESuccess, createRemoteCall, dispose, findAsyncRemoteServiceProxyClass, findAsyncRemoteServiceProxyClass, getAsyncArgs, getAsyncInvokeMethodName, getAsyncRemoteCall, getCallTimeoutForProxyInvoke, getDefaultTimeout, getFutureExecutorService, getIFutureExecutor, getProxy, getProxy, getRemoteService, getRemoteServiceProxyCreator, handleInvokeSyncException, handleProxyException, invoke, invokeAsync, invokeObject, invokeReturnAsync, isAsync, isInterfaceAsync, isMethodAsync, isOSGIAsync, loadInterfaceClass, loadInterfaceClass, setFutureExecutorService, setIFutureExecutorcallFuture, isReturnAsyncpublic static final int socketTimeout
public static final int connectRequestTimeout
public static final int connectTimeout
protected static final int DEFAULT_RESPONSE_BUFFER_SIZE
protected static final String DEFAULT_HTTP_CONTENT_CHARSET
protected org.apache.http.client.HttpClient httpClient
protected int responseBufferSize
public RestClientService(RestClientContainer container, RemoteServiceClientRegistration registration)
protected org.apache.http.client.HttpClient createHttpClient()
protected org.apache.http.client.methods.HttpGet createGetMethod(String uri)
protected org.apache.http.client.methods.HttpPost createPostMethod(String uri)
protected org.apache.http.client.methods.HttpPut createPutMethod(String uri)
protected org.apache.http.client.methods.HttpDelete createDeleteMethod(String uri)
protected org.apache.http.client.methods.HttpPatch createPatchMethod(String uri)
protected org.apache.http.client.methods.HttpRequestBase createAndPrepareHttpMethod(AbstractClientService.UriRequest request)
protected Object invokeRemoteCall(IRemoteCall call, IRemoteCallable callable) throws ECFException
invokeRemoteCall in class AbstractClientServicecall - The remote call to make. Must not be null.callable - The callable with default parameters to use to make the call.null if an
error occurs.ECFException - thrown if the call fails.protected boolean retrieveErrorResponseBody(org.apache.http.HttpResponse response)
protected byte[] getResponseAsBytes(org.apache.http.HttpResponse response)
throws IOException
IOExceptionprotected void setupTimeouts(org.apache.http.client.HttpClient httpClient,
IRemoteCall call,
IRemoteCallable callable)
protected void addRequestHeaders(org.apache.http.message.AbstractHttpMessage httpMethod,
IRemoteCall call,
IRemoteCallable callable)
protected org.apache.http.client.methods.HttpRequestBase createAndPrepareHttpMethod(String uri, IRemoteCall call, IRemoteCallable callable) throws RestException
RestExceptionprotected void prepareHttpMethod(org.apache.http.client.methods.HttpRequestBase httpMethod,
IRemoteCall call,
IRemoteCallable callable)
protected void setupHttpMethod(org.apache.http.client.methods.HttpRequestBase httpMethod,
IRemoteCall call,
IRemoteCallable callable)
protected org.apache.http.client.methods.HttpRequestBase prepareDeleteMethod(String uri, IRemoteCall call, IRemoteCallable callable) throws RestException
RestExceptionprotected org.apache.http.client.methods.HttpRequestBase preparePutMethod(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException, UnsupportedEncodingException
protected org.apache.http.client.methods.HttpRequestBase preparePatchMethod(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException, UnsupportedEncodingException
UnsupportedEncodingExceptionECFExceptionNotSerializableExceptionprotected org.apache.http.client.methods.HttpRequestBase preparePostMethod(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException, UnsupportedEncodingException
protected org.apache.http.client.methods.HttpRequestBase prepareGetMethod(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException
NotSerializableExceptionECFExceptionprotected org.apache.http.client.entity.UrlEncodedFormEntity getUrlEncodedFormEntity(List list, AbstractEntityRequestType postRequestType) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected org.apache.http.NameValuePair[] toNameValuePairs(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException
NotSerializableExceptionprotected void setupAuthenticaton(org.apache.http.client.HttpClient httpClient,
org.apache.http.client.methods.HttpRequestBase method)
Copyright © 2004–2020 Eclipse Foundation. All rights reserved.