eXo Kernel :: Component :: Common Service 2.4.11-UXP01

org.exoplatform.services.rpc
Class SingleMethodCallCommand

java.lang.Object
  extended by 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

Constructor Summary
SingleMethodCallCommand(Object component, String methodName, Class<?>... parameterTypes)
           
 
Method Summary
 Serializable execute(Serializable[] args)
          This method will execute the command on the local machine.
 String getId()
          Gives the id of the command
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleMethodCallCommand

public SingleMethodCallCommand(Object component,
                               String methodName,
                               Class<?>... parameterTypes)
                        throws SecurityException,
                               NoSuchMethodException,
                               ClassNotFoundException
Parameters:
component - the component on which we want to execute the method
methodName - the name of the method
parameterTypes - 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
Method Detail

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

eXo Kernel :: Component :: Common Service 2.4.11-UXP01

Copyright © 2014 eXo Platform SAS. All Rights Reserved.