Class JavaWrapperAgent

    • Method Summary

      All 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaWrapperAgent

        public JavaWrapperAgent()
    • Method Detail

      • executeJava

        public 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:
        executeJava in 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).
      • executeJava

        public 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:
        executeJava in 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).
      • executeJava

        public 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:
        executeJava in 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).