Class JavaJobDescription


  • public class JavaJobDescription
    extends JobDescription
    A JobDescription specialized in Java applications. A JavaJobDescription will use the Java specific information provided by the user to build the command line arguments of the JobDescription.
    Since:
    1.0
    • Constructor Detail

      • JavaJobDescription

        public JavaJobDescription()
    • Method Detail

      • getJavaOptions

        public java.util.List<java.lang.String> getJavaOptions()
        Returns the JVM options.
        Returns:
        the JVM options.
      • setJavaOptions

        public void setJavaOptions​(java.lang.String... options)
        Sets the JVM options.
        Parameters:
        options - the JVM options.
      • addJavaOption

        public void addJavaOption​(java.lang.String option)
        Adds a JVM option.
        Parameters:
        option - the JVM option.
      • getJavaSystemProperties

        public java.util.Map<java.lang.String,​java.lang.String> getJavaSystemProperties()
        Returns the java system properties.
        Returns:
        the java system properties.
      • setJavaSystemProperties

        public void setJavaSystemProperties​(java.util.Map<java.lang.String,​java.lang.String> systemProperties)
        Sets the system properties. A system property should be passed as a key value pair <"a", "b">, not as <"-Da", "b">, Xenon will add the -D to the property.
        Parameters:
        systemProperties - the system properties.
      • addJavaSystemProperty

        public void addJavaSystemProperty​(java.lang.String key,
                                          java.lang.String value)
        Adds a system property to the current set of system properties. The key of the system property should not start with "-D".
        Parameters:
        key - the key of the system property to be added
        value - the value belonging to the key of the system property to be added
      • getJavaMain

        public java.lang.String getJavaMain()
        Returns the main class of the java application.
        Returns:
        the main class.
      • setJavaMain

        public void setJavaMain​(java.lang.String main)
        Sets the main class.
        Parameters:
        main - the main class.
      • getJavaArguments

        public java.util.List<java.lang.String> getJavaArguments()
        Returns the arguments for the main class.
        Returns:
        the arguments for the main class
      • setJavaArguments

        public void setJavaArguments​(java.lang.String... javaArguments)
        Sets the arguments of the java main class.
        Parameters:
        javaArguments - the arguments of the java main class.
      • addJavaArgument

        public void addJavaArgument​(java.lang.String javaArgument)
      • getArguments

        public java.util.List<java.lang.String> getArguments()
        Constructs the command line arguments from the class path, the JVM options, the system properties, the main and the java arguments.
        Overrides:
        getArguments in class JobDescription
        Returns:
        the command line arguments
      • getArguments

        public java.util.List<java.lang.String> getArguments​(char pathSeparator)
        Constructs the command line arguments from the class path, the JVM options, the system properties, the main and the java arguments.
        Parameters:
        pathSeparator - the seperator to use in the classpath. Defaults to the unix path seperator ':'
        Returns:
        the command line arguments
      • getExecutable

        public java.lang.String getExecutable()
        Returns the executable. If no executable is set the default executable will be "java".
        Overrides:
        getExecutable in class JobDescription
        Returns:
        Returns the executable.
      • getJavaClasspath

        public java.util.List<java.lang.String> getJavaClasspath()
        Returns the java class path.
        Returns:
        the java class path.
      • setJavaClasspath

        public void setJavaClasspath​(java.lang.String... javaClasspath)
        Sets the java class path. Will automatically add separators when multiple elements are given.
        Parameters:
        javaClasspath - the class path to be set.
      • addJavaClasspathElement

        public void addJavaClasspathElement​(java.lang.String element)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class JobDescription