|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IRemoteService
Interface providing runtime access to a remote service. An instance
implementing this interface will be returned from the
IRemoteServiceContainerAdapter.getRemoteService(IRemoteServiceReference) and
may then be used to communicate with a remote service. The methods on this
interface support accessing the remote service in several ways:
null IFuture instance
that can be polled for results. See IFuture.get(),
IFuture.get(long), and IFuture.isDone().
timeout, exception, or successful completion)
IRemoteServiceReference[] references = serviceContainer
.getRemoteServiceReferences(null, "java.lang.Runnable", null);
IRemoteService remoteService = serviceContainer.getRemoteService(references[0]);
Runnable runnable = (Runnable) remoteService.getProxy();
runnable.run();
| Method Summary | |
|---|---|
org.eclipse.equinox.concurrent.future.IFuture |
callAsync(IRemoteCall call)
Call remote method specified by call parameter asynchronously, and immediately return IFuture instance. |
void |
callAsync(IRemoteCall call,
IRemoteCallListener listener)
Call remote method specified by call parameter asynchronously, and notify specified listener when call starts and completes. |
java.lang.Object |
callSync(IRemoteCall call)
Call remote method specified by call parameter synchronously. |
void |
fireAsync(IRemoteCall call)
Fire remote method specified by call parameter. |
java.lang.Object |
getProxy()
Get local proxy for remote interface. |
java.lang.Object |
getProxy(java.lang.ClassLoader cl,
java.lang.Class[] interfaceClasses)
Get local proxy for remote interface. |
| Method Detail |
|---|
java.lang.Object callSync(IRemoteCall call)
throws ECFException
call - the remote call to make
null if
remote provides null as result.
ECFException - thrown if disconnect occurs, caller not currently connected,
or remote throws Exception
void callAsync(IRemoteCall call,
IRemoteCallListener listener)
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,
IRemoteCallCompleteEventorg.eclipse.equinox.concurrent.future.IFuture callAsync(IRemoteCall call)
IFuture instance. Returned IFuture will not be null,
and allows the caller to retrieve the actual resulting value from the remote call
(or exception).
call - the remote call to make. Must not be null .
IFuture.isDone(), and then to IFuture.get()
the actual result.
void fireAsync(IRemoteCall call)
throws ECFException
call - the remote call to make. Must not be null .
ECFException - if caller not currently connected
java.lang.Object getProxy()
throws ECFException
null.
ECFException - If some problem in creating the proxy. The underlying problem is
conveyed in the nested exception.
java.lang.Object getProxy(java.lang.ClassLoader cl,
java.lang.Class[] interfaceClasses)
throws ECFException
cl - ClassLoader to use to create the proxy class.
Must not be null.interfaceClasses - array of Class that has the loaded interface classes.
Must not be null and should have dimension of one or more.
null
ECFException - If some problem in creating the proxy. The underlying problem is
conveyed in the nested exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||