Package jadex.platform.service.wrapper
Class JavaWrapperAgent
- java.lang.Object
- 
- jadex.platform.service.wrapper.JavaWrapperAgent
 
- 
- All Implemented Interfaces:
- IJavaWrapperService
 
 public class JavaWrapperAgent extends java.lang.Object implements IJavaWrapperService Wrapper for executing Java programs.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IInternalAccessagentThe agent.protected ILibraryServicelibserviceThe library service.protected IThreadPoolServicetpserviceThe thread pool service.
 - 
Constructor SummaryConstructors Constructor Description JavaWrapperAgent()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Void>executeJava(IResourceIdentifier rid, java.lang.String[] args)Execute a plain Java program from a jar as given by a resource identifier.IFuture<java.lang.Void>executeJava(java.lang.Class<?> clazz, java.lang.String[] args)Execute a plain Java program as given by its main class.IFuture<java.lang.Void>executeJava(java.lang.String jarfile, java.lang.String[] args)Execute a plain Java program from a jar as given by a file name.
 
- 
- 
- 
Field Detail- 
agentprotected IInternalAccess agent The agent.
 - 
tpserviceprotected IThreadPoolService tpservice The thread pool service.
 - 
libserviceprotected ILibraryService libservice The library service.
 
- 
 - 
Method Detail- 
executeJavapublic IFuture<java.lang.Void> executeJava(java.lang.Class<?> clazz, java.lang.String[] args) Execute a plain Java program as given by its main class.- Specified by:
- executeJavain interface- IJavaWrapperService
- Parameters:
- clazz- The class to be executed as Java program.
- args- The arguments to the main method.
- Returns:
- A future indication successful execution (result: null) or failure (exception).
 
 - 
executeJavapublic IFuture<java.lang.Void> executeJava(java.lang.String jarfile, java.lang.String[] args) Execute a plain Java program from a jar as given by a file name. Uses the main class name as specified in the manifest.- Specified by:
- executeJavain interface- IJavaWrapperService
- Parameters:
- jarfile- File name of a jar file.
- args- The arguments to the main method.
- Returns:
- A future indication successful execution (result: null) or failure (exception).
 
 - 
executeJavapublic IFuture<java.lang.Void> executeJava(IResourceIdentifier rid, java.lang.String[] args) Execute a plain Java program from a jar as given by a resource identifier. Uses the main class name as specified in the manifest.- Specified by:
- executeJavain interface- IJavaWrapperService
- Parameters:
- rid- The resource identifier for the jar (global rid for maven artifact id, local rid for local file url).
- args- The arguments to the main method.
- Returns:
- A future indication successful execution (result: null) or failure (exception).
 
 
- 
 
-