Package com.sun.enterprise.admin.util
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 Summary
Constructors Constructor Description JvmOptionsHelper(String[] options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
addJvmOptions(String[] options)
Adds the options to its current set.String[]
deleteJvmOptions(String[] options)
Deletes the options from its current set.String[]
getJvmOptions()
Returns the current set of Jvm options.String[]
getJvmOptionsAsStoredInXml()
Returns the current set of Jvm options.static String[]
toStringArray(Collection c)
-
-
-
Constructor Detail
-
JvmOptionsHelper
public JvmOptionsHelper(String[] options) throws InvalidJvmOptionException
- Throws:
InvalidJvmOptionException
-
-
Method Detail
-
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.
-
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)
-
-