org.exoplatform.services.rpc
Class SingleMethodCallCommand
java.lang.Object
org.exoplatform.services.rpc.SingleMethodCallCommand
- All Implemented Interfaces:
- RemoteCommand
public class SingleMethodCallCommand
- extends Object
- implements RemoteCommand
This command will allow you to call one specific method with the arguments given by the execute method
on a component.
- Version:
- $Id$
- Author:
- Nicolas Filotto
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleMethodCallCommand
public SingleMethodCallCommand(Object component,
String methodName,
Class<?>... parameterTypes)
throws SecurityException,
NoSuchMethodException,
ClassNotFoundException
- Parameters:
component - the component on which we want to execute the methodmethodName - the name of the methodparameterTypes - the parameter array
- Throws:
NoSuchMethodException - if a matching method is not found.
SecurityException - If a security manager, s, is present and any of the
following conditions is met:
ClassNotFoundException - If the last parameter type is an array and we
cannot find the type of the array
execute
public Serializable execute(Serializable[] args)
throws Throwable
- This method will execute the command on the local machine.
- Specified by:
execute in interface RemoteCommand
- Parameters:
args - The parameters needed to execute the command
- Returns:
- arbitrary return value generated by performing this command
- Throws:
Throwable - in the event of problems.
getId
public String getId()
- Gives the id of the command
- Specified by:
getId in interface RemoteCommand
- Returns:
- the unique ID of the command
Copyright © 2012 eXo Platform SAS. All Rights Reserved.