Class AbstractRSAClientService
- java.lang.Object
- 
- org.eclipse.ecf.remoteservice.asyncproxy.AbstractAsyncProxyRemoteService
- 
- org.eclipse.ecf.remoteservice.AbstractRemoteService
- 
- org.eclipse.ecf.remoteservice.client.AbstractClientService
- 
- org.eclipse.ecf.remoteservice.client.AbstractRSAClientService
 
 
 
 
- 
- All Implemented Interfaces:
- InvocationHandler,- IRemoteService
 
 public abstract class AbstractRSAClientService extends AbstractClientService Abstract client remote service instance. This class should be overridden to implement the abstract invokeAsync, and invokeSync methods, which will be called when the proxy created is called by clients.- Since:
- 8.9
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classAbstractRSAClientService.RSARemoteCall- 
Nested classes/interfaces inherited from class org.eclipse.ecf.remoteservice.client.AbstractClientServiceAbstractClientService.AsyncResult, AbstractClientService.UriRequest
 - 
Nested classes/interfaces inherited from class org.eclipse.ecf.remoteservice.AbstractRemoteServiceAbstractRemoteService.AsyncArgs, AbstractRemoteService.ProxyClassLoader
 
- 
 - 
Field Summary- 
Fields inherited from class org.eclipse.ecf.remoteservice.client.AbstractClientServicecontainer, registration
 - 
Fields inherited from class org.eclipse.ecf.remoteservice.AbstractRemoteServiceEMPTY_ARGS, futureExecutorService, futureExecutorServiceMaxThreads, iFutureExecutor
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractRSAClientService(AbstractClientContainer container, RemoteServiceClientRegistration registration)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcallAsync(IRemoteCall call, IRemoteCallListener listener)Call remote method specified by call parameter asynchronously, and notify specified listener when call starts and completes.ObjectcallSync(IRemoteCall call)Call remote method specified by call parameter synchronously.protected AbstractRSAClientService.RSARemoteCallcreateRemoteCall(Object proxy, Method method, String methodName, Object[] parameters, long timeout)protected Callable<IRemoteCallCompleteEvent>getAsyncCallable(AbstractRSAClientService.RSARemoteCall call)protected ExecutorServicegetExecutorService()protected ExecutorServicegetFutureExecutorService(IRemoteCall call)protected Callable<Object>getSyncCallable(AbstractRSAClientService.RSARemoteCall call)Objectinvoke(Object proxy, Method method, Object[] args)protected ObjectinvokeAsync(AbstractRSAClientService.RSARemoteCall remoteCall)Invoke a remote call asynchronously.protected ObjectinvokeRemoteCall(IRemoteCall call, IRemoteCallable callable)Invoke remote call.protected ObjectinvokeSync(AbstractRSAClientService.RSARemoteCall remoteCall)Invoke a remote call synchronously.- 
Methods inherited from class org.eclipse.ecf.remoteservice.client.AbstractClientServicecallAsync, callAsync, callAsync, createUriRequest, fireAsync, getCallMethodNameForProxyInvoke, getCallParametersForProxyInvoke, getClientContainer, getInterfaceClassNames, getNextRequestID, getRegistration, getRemoteServiceID, getRemoteServiceReference, handleInvokeException, invokeSync, prepareEndpointAddress, prepareParameters, processResponse
 - 
Methods inherited from class org.eclipse.ecf.remoteservice.AbstractRemoteServiceaddAsyncProxyClasses, 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
 - 
Methods inherited from class org.eclipse.ecf.remoteservice.asyncproxy.AbstractAsyncProxyRemoteServicecallFuture, isReturnAsync
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractRSAClientServicepublic AbstractRSAClientService(AbstractClientContainer container, RemoteServiceClientRegistration registration) 
 
- 
 - 
Method Detail- 
invokeRemoteCallprotected Object invokeRemoteCall(IRemoteCall call, IRemoteCallable callable) throws ECFException Description copied from class:AbstractClientServiceInvoke remote call. The implementation of this method should actually make the remote call for the given call and associated callable.- Specified by:
- invokeRemoteCallin class- AbstractClientService
- Parameters:
- call- the remote call to invoke
- callable- the remote callable to invoke
- Returns:
- Object result of remote call
- Throws:
- ECFException- if invoke fails
 
 - 
invokeAsyncprotected Object invokeAsync(AbstractRSAClientService.RSARemoteCall remoteCall) throws ECFException Invoke a remote call asynchronously. This method should not block and should return either aIFuture,Future, orCompletableFutureor a CompletableFuture based upon the return type defined in the asynchronous service interface.- Parameters:
- remoteCall- the RSARemoteCall to use to make the asynchronous remote call. Will not be- null.
- Returns:
- Object.   Should return a non-null instance of IFuture,Future, orCompletableFuture
- Throws:
- ECFException- if async cannot be invoked
 
 - 
invokeSyncprotected Object invokeSync(AbstractRSAClientService.RSARemoteCall remoteCall) throws ECFException Invoke a remote call synchronously. This method should block until a value may be returned, or the remote call has failed or timed out.- Parameters:
- remoteCall- the RSARemoteCall to synchronously invoke. Will not be- null.
- Returns:
- the result (of appropriate type)
- Throws:
- ECFException- if some exception occurred during invocation
 
 - 
createRemoteCallprotected AbstractRSAClientService.RSARemoteCall createRemoteCall(Object proxy, Method method, String methodName, Object[] parameters, long timeout) 
 - 
invokepublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable - Specified by:
- invokein interface- InvocationHandler
- Overrides:
- invokein class- AbstractRemoteService
- Throws:
- Throwable
 
 - 
getFutureExecutorServiceprotected ExecutorService getFutureExecutorService(IRemoteCall call) - Overrides:
- getFutureExecutorServicein class- AbstractRemoteService
- Parameters:
- call- the remote call to get the ExecutorService for
- Returns:
- ExecutorService
 
 - 
callAsyncpublic void callAsync(IRemoteCall call, IRemoteCallListener listener) Description copied from interface:IRemoteServiceCall remote method specified by call parameter asynchronously, and notify specified listener when call starts and completes.- Specified by:
- callAsyncin interface- IRemoteService
- Overrides:
- callAsyncin class- AbstractClientService
- Parameters:
- 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.
- See Also:
- IRemoteCallStartEvent,- IRemoteCallCompleteEvent
 
 - 
callSyncpublic Object callSync(IRemoteCall call) throws ECFException Description copied from interface:IRemoteServiceCall remote method specified by call parameter synchronously.- Specified by:
- callSyncin interface- IRemoteService
- Overrides:
- callSyncin class- AbstractClientService
- Parameters:
- call- the remote call to make
- Returns:
- Object the result of the call. Will be nullif remote providesnullas result.
- Throws:
- ECFException- thrown if disconnect occurs, caller not currently connected, or remote throws Exception
 
 - 
getExecutorServiceprotected ExecutorService getExecutorService() - Since:
- 8.13
 
 - 
getAsyncCallableprotected Callable<IRemoteCallCompleteEvent> getAsyncCallable(AbstractRSAClientService.RSARemoteCall call) - Since:
- 8.13
 
 - 
getSyncCallableprotected Callable<Object> getSyncCallable(AbstractRSAClientService.RSARemoteCall call) - Since:
- 8.13
 
 
- 
 
-