|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hyperic.util.unittest.server.ServerLifecycle
public class ServerLifecycle
This class manages the Hyperic Server lifecycle in a unit testing environment.
It is assumed that the local jboss deployment has already been prepared
using the Ant target unittest-prepare-jboss. In addition we are
assuming that this is a clean instance of jboss that does not include an HQ EAR
deployment and there is no other instance of the Hyperic server currently
running on the host.
| Constructor Summary | |
|---|---|
ServerLifecycle(java.io.File jbossHomeDir)
Create an instance using the "default" configuration in the jboss home dir. |
|
ServerLifecycle(java.io.File jbossHomeDir,
java.lang.String configuration)
Create an instance using the specified configuration in the jboss home dir. |
|
| Method Summary | |
|---|---|
LocalInterfaceRegistry |
deploy(java.net.URL url)
Deploy the package represented by the URL. |
boolean |
isStarted()
|
void |
startServer()
Start the server. |
void |
stopServer()
Stop the server iff it is already started. |
void |
undeploy(java.net.URL url)
Undeploy the package represented by the URL iff the server is started. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerLifecycle(java.io.File jbossHomeDir)
throws java.io.IOException
jbossHomeDir - The path to the local jboss deployment.
java.lang.NullPointerException - if the jboss home dir is null.
java.lang.IllegalArgumentException - if the jboss home dir does not exist.
java.io.IOException - if the jboss home dir path cannot be resolved.
public ServerLifecycle(java.io.File jbossHomeDir,
java.lang.String configuration)
throws java.io.IOException
jbossHomeDir - The path to the local jboss deployment.configuration - The configuration name.
java.lang.NullPointerException - if the jboss home dir or configuration name
is null.
java.lang.IllegalArgumentException - if the jboss home dir does not exist.
java.io.IOException - if the jboss home dir path cannot be resolved.| Method Detail |
|---|
public boolean isStarted()
true if the server is started;
false otherwise.
public void startServer()
throws java.lang.Exception
java.lang.Exception - if the server fails to start.public void stopServer()
public LocalInterfaceRegistry deploy(java.net.URL url)
throws java.lang.Exception
url - The URL representing the package to deploy.
java.lang.IllegalStateException - if the server is not started.
java.lang.Exception - if the package cannot be deployed.
public void undeploy(java.net.URL url)
throws java.lang.Exception
url - The URL representing the package to undeploy.
java.lang.Exception - if the package cannot be undeployed.
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||