org.eclipse.ecf.provider.remoteservice.generic
Class RemoteServiceImpl

java.lang.Object
  extended by org.eclipse.ecf.remoteservice.AbstractRemoteService
      extended by org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceImpl
All Implemented Interfaces:
java.lang.reflect.InvocationHandler, IRemoteService

public class RemoteServiceImpl
extends AbstractRemoteService


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ecf.remoteservice.AbstractRemoteService
AbstractRemoteService.AsyncArgs
 
Field Summary
protected static long DEFAULT_TIMEOUT
           
protected  RemoteServiceRegistrationImpl registration
           
protected  RegistrySharedObject sharedObject
           
 
Fields inherited from class org.eclipse.ecf.remoteservice.AbstractRemoteService
EMPTY_ARGS
 
Constructor Summary
RemoteServiceImpl(RegistrySharedObject sharedObject, RemoteServiceRegistrationImpl registration)
           
 
Method Summary
 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.
protected  long getDefaultTimeout()
           
protected  java.lang.String[] getInterfaceClassNames()
           
protected  IRemoteServiceID getRemoteServiceID()
           
protected  IRemoteServiceReference getRemoteServiceReference()
           
 
Methods inherited from class org.eclipse.ecf.remoteservice.AbstractRemoteService
callAsync, convertInterfaceNameToAsyncInterfaceName, createProxy, findAsyncRemoteServiceProxyClass, getAsyncArgs, getAsyncInvokeMethodName, getCallMethodNameForProxyInvoke, getCallParametersForProxyInvoke, getCallTimeoutForProxyInvoke, getProxy, getRemoteService, invoke, invokeAsync, invokeObject, invokeSync, loadInterfaceClass, logWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

protected static final long DEFAULT_TIMEOUT

registration

protected RemoteServiceRegistrationImpl registration

sharedObject

protected RegistrySharedObject sharedObject
Constructor Detail

RemoteServiceImpl

public RemoteServiceImpl(RegistrySharedObject sharedObject,
                         RemoteServiceRegistrationImpl registration)
Method Detail

getRemoteServiceID

protected IRemoteServiceID getRemoteServiceID()
Specified by:
getRemoteServiceID in class AbstractRemoteService

getRemoteServiceReference

protected IRemoteServiceReference getRemoteServiceReference()
Specified by:
getRemoteServiceReference in class AbstractRemoteService

getInterfaceClassNames

protected java.lang.String[] getInterfaceClassNames()
Specified by:
getInterfaceClassNames in class AbstractRemoteService

getDefaultTimeout

protected long getDefaultTimeout()
Overrides:
getDefaultTimeout in class AbstractRemoteService

callAsync

public void callAsync(IRemoteCall call,
                      IRemoteCallListener listener)
Description copied from interface: IRemoteService
Call remote method specified by call parameter asynchronously, and notify specified listener when call starts and completes.

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 .
Since:
3.0
See Also:
IRemoteService.callAsync(org.eclipse.ecf.remoteservice.IRemoteCall, org.eclipse.ecf.remoteservice.IRemoteCallListener)

callSync

public java.lang.Object callSync(IRemoteCall call)
                          throws ECFException
Description copied from interface: IRemoteService
Call remote method specified by call parameter synchronously.

Parameters:
call - the remote call to make
Returns:
Object the result of the call. Will be null if remote provides null as result.
Throws:
ECFException - thrown if disconnect occurs, caller not currently connected, or remote throws Exception
Since:
3.0
See Also:
IRemoteService.callSync(org.eclipse.ecf.remoteservice.IRemoteCall)

fireAsync

public void fireAsync(IRemoteCall call)
               throws ECFException
Description copied from interface: IRemoteService
Fire remote method specified by call parameter. The remote method will be invoked as a result of asynchronous message send, but no failure/exception information will be returned, and no result will be returned

Parameters:
call - the remote call to make. Must not be null .
Throws:
ECFException - if caller not currently connected
Since:
3.0
See Also:
IRemoteService.fireAsync(org.eclipse.ecf.remoteservice.IRemoteCall)