Package com.biglybt.pif.ipc
Interface IPCInterface
- All Known Implementing Classes:
IPCInterfaceImpl
public interface IPCInterface
-
Method Summary
-
Method Details
-
invoke
This function will call the given method on the plugin. This function allows direct method calls to the plugin using Java Reflection API. Primitives likeint
,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 client 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 methodString randomize (String x);
String result = (String)invoke("randomize", new Object[]{"foobar"}); //result ("bfaoro")
- Parameters:
methodName
- the name of the Methods to be calledparams
- Parameters of the Method- Returns:
- returns the result of the method
- Throws:
IPCException
-
canInvoke
Test for existance of IPC method - params as above- Parameters:
methodName
-params
-- Returns:
-