Class BootstrapProperties

java.lang.Object
org.glassfish.embeddable.BootstrapProperties

public class BootstrapProperties extends Object
Encapsulates the set of properties required to bootstrap GlassFishRuntime.
 ...
 GlassFishRuntime runtime = GlassFishRuntime.bootstrap(new BootstrapProperties());
 GlassFish glassfish = runtime.newGlassFish(glassFishProperties);
 ...
 
Author:
bhavanishankar@dev.java.net, Prasad.Subramanian@Sun.COM
  • Constructor Details

    • BootstrapProperties

      public BootstrapProperties()
      Create BootstrapProperties with default properties.
    • BootstrapProperties

      public BootstrapProperties(Properties props)
      Create BootstrapProperties with custom properties. This method does not take a copy of the passed in properties object; instead it just maintains a reference to it, so all semantics of "pass-by-reference" applies.

      Custom properties can include GlassFish_Platform, com.sun.aas.installRoot, com.sun.aas.installRootURI

      Custom properties can also include additional properties which are required for the plugged in RuntimeBuilder (if any)

      Parameters:
      props - Properties object which will back this BootstrapProperties object.
  • Method Details

    • getProperties

      public Properties getProperties()
      Get the underlying Properties object which backs this BootstrapProperties.

      If getProperties().setProperty(key,value) is called, then it will add a property to this bootstrap properties.

      Returns:
      The Properties object that is backing this BootstrapProperties.
    • setInstallRoot

      public void setInstallRoot(String installRoot)
      Optionally set the installation root using which the GlassFish should run.
      Parameters:
      installRoot - Location of installation root.
    • getInstallRoot

      public String getInstallRoot()
      Get the location installation root set using setInstallRoot(java.lang.String)
      Returns:
      Location of installation root set using setInstallRoot(java.lang.String)
    • setProperty

      public void setProperty(String key, String value)
      Set any custom bootstrap property. May be required for the plugged in RuntimeBuilder (if any)
      Parameters:
      key - the key to be placed into this bootstrap properties.
      value - the value corresponding to the key.
    • getProperty

      public String getProperty(String key)
      Get the value of the property with the specified key.
      Parameters:
      key - the property key
      Returns:
      value of the property for the specified key, null if there is no such property.
    • toString

      public String toString()
      Overrides:
      toString in class Object