org.nuiton.util.rmi
Class RemoteMethodExecutorImpl<T>
java.lang.Object
org.nuiton.util.rmi.RemoteMethodExecutorImpl<T>
- All Implemented Interfaces:
- Remote, RemoteMethodExecutor
public class RemoteMethodExecutorImpl<T>
- extends Object
- implements RemoteMethodExecutor
RMI implementation of an invocation handler. This object will be exported to
a RMI registry and will delegate method calls to some business service. The
service is provided in the constructor.
- Author:
- Arnaud Thimel
|
Field Summary |
protected T |
service
The target service on which calls will be made |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
service
protected T service
- The target service on which calls will be made
RemoteMethodExecutorImpl
public RemoteMethodExecutorImpl(T service)
- This is the only available constructor. It is mandatory to specify a
target service on which call will be
delegated.
- Parameters:
service - the mandatory service which calls will be delegated on
execute
public Object execute(String methodName,
Class<?>[] parametersType,
Object[] args)
throws RemoteException
- Description copied from interface:
RemoteMethodExecutor
- Acts like an InvocationHandler.
- Specified by:
execute in interface RemoteMethodExecutor
- Parameters:
methodName - name of the method to invokeparametersType - parameters type to reliably identify the methodargs - method arguments to process the effective call
- Returns:
- the result of the delegate method
- Throws:
RemoteException - for any error. Business exceptions will be
wrapped.
Copyright © 2004-2012 CodeLutin. All Rights Reserved.