FileDocCategorySizeDatePackage
IPCInterface.javaAPI DocAzureus 3.0.3.42256Wed Nov 15 11:28:52 GMT 2006org.gudy.azureus2.plugins.ipc

IPCInterface

public interface IPCInterface
author
Damokles

Fields Summary
Constructors Summary
Methods Summary
public java.lang.Objectinvoke(java.lang.String methodName, java.lang.Object[] params)
This function will call the given method on the plugin. This function allows direct method calls to the plugin using Java Reflection API. Primitives like int, boolean need to be wrapped in their Objects (int -> Integer).

Results will be returned as Object and can be classcasted.

WARNING: only call Methods that use Java or Azureus Classes the use of custom classes may cause problems.

Examples:

1. Plugin has method int add (int x, int y);

int result = ((Integer)invoke ("add", new Object[] {Integer.valueOf(10),Integer.valueOf(5)}).intValue();
//result (15)
2. Plugin has method String randomize (String x);
String result = (String)invoke("randomize", new Object[]{"foobar"});
//result ("bfaoro")

param
methodName the name of the Methods to be called
param
params Parameters of the Method
return
returns the result of the method