|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.embeddable.GlassFishProperties
public class GlassFishProperties
Encapsulates the set of properties required to create a new GlassFish instance.
Eg.., GlassFishRuntime.bootstrap(new BootstrapProperties()).newGlassFish(new GlassFishProperties());
| Constructor Summary | |
|---|---|
GlassFishProperties()
Create GlassFishProperties with default properties. |
|
GlassFishProperties(Properties props)
Create GlassFishProperties with custom properties. |
|
| Method Summary | |
|---|---|
String |
getConfigFileURI()
Get the configurationFileURI set using setConfigFileURI(String) |
String |
getInstanceRoot()
Get the location instance root set using setInstanceRoot(String) |
int |
getPort(String networkListener)
Get the port number set using setPort(String, int) |
Properties |
getProperties()
Get the underlying Properties object which backs this GlassFishProperties. |
boolean |
isConfigFileReadOnly()
Check whether the specified configuration file or config/domain.xml at the specified instance root is operated read only or not. |
void |
setConfigFileReadOnly(boolean readOnly)
Mention whether or not the GlassFish should writeback any changes to specified configuration file or config/domain.xml at the specified instance root. |
void |
setConfigFileURI(String configFileURI)
Optionally set the location of configuration file (i.e., domain.xml) using which the GlassFish should run. |
void |
setInstanceRoot(String instanceRoot)
Optionally set the instance root (aka domain dir) using which the GlassFish should run. |
void |
setPort(String networkListener,
int port)
Set the port number for a network listener that the GlassFish server should use. |
void |
setProperty(String key,
String value)
Set any custom glassfish property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GlassFishProperties()
public GlassFishProperties(Properties props)
GlassFishRuntime (if any)
props - Properties object which will back this GlassFishProperties object.| Method Detail |
|---|
public Properties getProperties()
public void setProperty(String key,
String value)
GlassFishRuntime (if any)
key - the key to be placed into this glassfish properties.value - the value corresponding to the key.public void setInstanceRoot(String instanceRoot)
setConfigFileReadOnly(boolean) by passing 'false'
If the instance root is not specified, then a small sized temporary
instance directory is created in the current directory. The temporary
instance directory will get deleted when the glassfish.dispose() is called.
instanceRoot - Location of the instance root.public String getInstanceRoot()
setInstanceRoot(String)
setInstanceRoot(String)public void setConfigFileURI(String configFileURI)
setConfigFileReadOnly(boolean) with 'false'.
configFileURI - Location of configuration file.public String getConfigFileURI()
setConfigFileURI(String)
setConfigFileURI(String)public boolean isConfigFileReadOnly()
public void setConfigFileReadOnly(boolean readOnly)
readOnly - false to writeback any changes.
public void setPort(String networkListener,
int port)
setPort("http-listener", 8080); // GlassFish will listen on HTTP port 8080
setPort("https-listener", 8181); // GlassFish will listen on HTTPS port 8181
2. When the custom configuration file (domain.xml) is used, then the
name of the network listener specified here will point to the
network-listener element in the domain.xml. For example:
setPort("joe", 8080);
will point to server.network-config.network-listeners.network-listener.joe. Hence the
GlassFish server will use "joe" network listener with its port set to 8080.
If there is no such network-listener by name "joe" in the supplied domain.xml,
then the server will throw an exception and fail to start.
networkListener - Name of the network listener.port - Port numberpublic int getPort(String networkListener)
setPort(String, int)
networkListener - Name of the listener
setPort(String, int).
-1 if it was not set previously.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||