Class JvmOptionsHelper

java.lang.Object
com.sun.enterprise.admin.util.JvmOptionsHelper

public final class JvmOptionsHelper extends Object
A helper class to facilitate the add/delete/get jvm options.
  • Constructor Details

  • Method Details

    • addJvmOptions

      public String[] addJvmOptions(String[] options) throws InvalidJvmOptionException
      Adds the options to its current set. Omits options that already exist. Note :- This method depends on the exact String comparision of the options. Hence an option "a=b c=d" will be added even if individual options already exist.
      Parameters:
      options -
      Returns:
      Returns an array of options that could not be added. The array will be atleast of 0 length. An array of length > 0 indicates that some options haven't been added successfully.
      Throws:
      InvalidJvmOptionException - If any option is invalid. For example, an option that does not start with '-'.
      IllegalArgumentException - If options param is null.
    • last

      public com.sun.enterprise.admin.util.JvmOptionsElement last()
      Returns the last JvmOptionsElement in the chain of responsibility.
    • deleteJvmOptions

      public String[] deleteJvmOptions(String[] options)
      Deletes the options from its current set.
      Parameters:
      options -
      Returns:
      Returns an array of options that could not be deleted. The array will be atleast of 0 length. An array of length > 0 indicates that some options haven't been deleted successfully.
      Throws:
      IllegalArgumentException - If options param is null.
    • getJvmOptionsAsStoredInXml

      public String[] getJvmOptionsAsStoredInXml()
      Returns the current set of Jvm options.
    • getJvmOptions

      public String[] getJvmOptions()
      Returns the current set of Jvm options.
    • toStringArray

      public static String[] toStringArray(Collection c)