com.sun.enterprise.admin.util
Class JvmOptionsHelper

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

public final class JvmOptionsHelper
extends java.lang.Object

A helper class to facilitate the add/delete/get jvm options.


Constructor Summary
JvmOptionsHelper(java.lang.String[] options)
           
 
Method Summary
 java.lang.String[] addJvmOptions(java.lang.String[] options)
          Adds the options to its current set.
 java.lang.String[] deleteJvmOptions(java.lang.String[] options)
          Deletes the options from its current set.
 java.lang.String[] getJvmOptions()
          Returns the current set of Jvm options.
 java.lang.String[] getJvmOptionsAsStoredInXml()
          Returns the current set of Jvm options.
 com.sun.enterprise.admin.util.JvmOptionsElement last()
          Returns the last JvmOptionsElement in the chain of responsibility.
static java.lang.String[] toStringArray(java.util.Collection c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JvmOptionsHelper

public JvmOptionsHelper(java.lang.String[] options)
                 throws InvalidJvmOptionException
Throws:
InvalidJvmOptionException
Method Detail

addJvmOptions

public java.lang.String[] addJvmOptions(java.lang.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 '-'.
java.lang.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 java.lang.String[] deleteJvmOptions(java.lang.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:
java.lang.IllegalArgumentException - If options param is null.

getJvmOptionsAsStoredInXml

public java.lang.String[] getJvmOptionsAsStoredInXml()
Returns the current set of Jvm options.


getJvmOptions

public java.lang.String[] getJvmOptions()
Returns the current set of Jvm options.


toStringArray

public static java.lang.String[] toStringArray(java.util.Collection c)


Copyright © 2012 GlassFish Community. All Rights Reserved.