com.funambol.client.ipc.rpc
Class RPCMethod

java.lang.Object
  extended by com.funambol.client.ipc.rpc.RPCMethod

public abstract class RPCMethod
extends java.lang.Object

This class represents a method that can be registered into the RPCManager to be accessible from remote. Such a method has a name that must be unique (no overloading is supported) and the it has an abstract execution method associated. When a request arrives to execute this method, the RPCManager invokes the execute method of the RPCMethod which is responsible for processing the incoming paramters and to produce the expected output parameter (if any).


Constructor Summary
RPCMethod(java.lang.String methodName)
          Build a RPCMethod, a method that can be invoked from remote.
 
Method Summary
abstract  RPCParam execute(RPCParam[] params)
          This method is called back on remote execution of this RPCMethod.
 java.lang.String getName()
          Get the method's name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RPCMethod

public RPCMethod(java.lang.String methodName)
Build a RPCMethod, a method that can be invoked from remote.

Parameters:
methodName - the method name
Method Detail

getName

public java.lang.String getName()
Get the method's name

Returns:
the method name

execute

public abstract RPCParam execute(RPCParam[] params)
                          throws java.lang.Exception
This method is called back on remote execution of this RPCMethod. This method is executed by the RPCManager in its own thread.

Parameters:
params - the parameters given to the method (null if no parameters are supplied)
Returns:
the return value (if any, null otherwise)
Throws:
java.lang.Exception


Copyright © 2001-2009 Funambol.