public abstract class AbstractRSAClientService extends AbstractClientService
Modifier and Type | Class and Description |
---|---|
static class |
AbstractRSAClientService.RSARemoteCall |
AbstractClientService.AsyncResult, AbstractClientService.UriRequest
AbstractRemoteService.AsyncArgs, AbstractRemoteService.ProxyClassLoader
container, registration
EMPTY_ARGS, futureExecutorService, futureExecutorServiceMaxThreads, iFutureExecutor
Constructor and Description |
---|
AbstractRSAClientService(AbstractClientContainer container,
RemoteServiceClientRegistration registration) |
Modifier and Type | Method and Description |
---|---|
void |
callAsync(IRemoteCall call,
IRemoteCallListener listener)
Call remote method specified by call parameter asynchronously, and notify
specified listener when call starts and completes.
|
Object |
callSync(IRemoteCall call)
Call remote method specified by call parameter synchronously.
|
protected AbstractRSAClientService.RSARemoteCall |
createRemoteCall(Object proxy,
Method method,
String methodName,
Object[] parameters,
long timeout) |
protected Callable<IRemoteCallCompleteEvent> |
getAsyncCallable(AbstractRSAClientService.RSARemoteCall call) |
protected ExecutorService |
getExecutorService() |
protected ExecutorService |
getFutureExecutorService(IRemoteCall call) |
protected Callable<Object> |
getSyncCallable(AbstractRSAClientService.RSARemoteCall call) |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
protected Object |
invokeAsync(AbstractRSAClientService.RSARemoteCall remoteCall)
Invoke a remote call asynchronously.
|
protected Object |
invokeRemoteCall(IRemoteCall call,
IRemoteCallable callable)
Invoke remote call.
|
protected Object |
invokeSync(AbstractRSAClientService.RSARemoteCall remoteCall)
Invoke a remote call synchronously.
|
callAsync, callAsync, callAsync, createUriRequest, fireAsync, getCallMethodNameForProxyInvoke, getCallParametersForProxyInvoke, getClientContainer, getInterfaceClassNames, getNextRequestID, getRegistration, getRemoteServiceID, getRemoteServiceReference, handleInvokeException, invokeSync, prepareEndpointAddress, prepareParameters, processResponse
addAsyncProxyClasses, 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, getIFutureExecutor, getProxy, getProxy, getRemoteService, getRemoteServiceProxyCreator, handleInvokeSyncException, handleProxyException, invokeAsync, invokeObject, invokeReturnAsync, isAsync, isInterfaceAsync, isMethodAsync, isOSGIAsync, loadInterfaceClass, loadInterfaceClass, logWarning, setFutureExecutorService, setIFutureExecutor
callFuture, isReturnAsync
public AbstractRSAClientService(AbstractClientContainer container, RemoteServiceClientRegistration registration)
protected Object invokeRemoteCall(IRemoteCall call, IRemoteCallable callable) throws ECFException
AbstractClientService
invokeRemoteCall
in class AbstractClientService
call
- the remote call to invokecallable
- the remote callable to invokeECFException
- if invoke failsprotected Object invokeAsync(AbstractRSAClientService.RSARemoteCall remoteCall) throws ECFException
IFuture
, Future
, or CompletableFuture
or a
CompletableFuture based upon the return type defined in the asynchronous service interface.remoteCall
- the RSARemoteCall to use to make the asynchronous remote call. Will not be null
.IFuture
, Future
, or CompletableFuture
ECFException
- if async cannot be invokedprotected Object invokeSync(AbstractRSAClientService.RSARemoteCall remoteCall) throws ECFException
remoteCall
- the RSARemoteCall to synchronously invoke. Will not be null
.ECFException
- if some exception occurred during invocationprotected AbstractRSAClientService.RSARemoteCall createRemoteCall(Object proxy, Method method, String methodName, Object[] parameters, long timeout)
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
invoke
in class AbstractRemoteService
Throwable
protected ExecutorService getFutureExecutorService(IRemoteCall call)
getFutureExecutorService
in class AbstractRemoteService
call
- the remote call to get the ExecutorService forpublic void callAsync(IRemoteCall call, IRemoteCallListener listener)
IRemoteService
callAsync
in interface IRemoteService
callAsync
in class AbstractClientService
call
- the remote call to make. Must not be null
.listener
- the listener to notify when call starts and is completed. The
listener will be notified via the two event types
IRemoteCallStartEvent and IRemoteCallCompleteEvent. Must not
be null
.IRemoteCallStartEvent
,
IRemoteCallCompleteEvent
public Object callSync(IRemoteCall call) throws ECFException
IRemoteService
callSync
in interface IRemoteService
callSync
in class AbstractClientService
call
- the remote call to makenull
if
remote provides null
as result.ECFException
- thrown if disconnect occurs, caller not currently connected,
or remote throws Exceptionprotected ExecutorService getExecutorService()
protected Callable<IRemoteCallCompleteEvent> getAsyncCallable(AbstractRSAClientService.RSARemoteCall call)
protected Callable<Object> getSyncCallable(AbstractRSAClientService.RSARemoteCall call)
Copyright © 2004–2020 Eclipse Foundation. All rights reserved.