|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.maxiq.tools.jboss.JMXBean | +--com.maxiq.tools.jboss.JMXDeploymentMonitor
Bean capable of monitoring the deployment status of a particular
artifact into the JBoss environment. Upon a call to execute()
a polled wait is performed until the specified condition is met or
timeout occurs.
Note that the system property com.maxiq.tools.jboss.home"
should be properly set to the home of a running JBoss installation.
Constructor Summary | |
JMXDeploymentMonitor()
|
Method Summary | |
void |
execute()
"execute" method allows using this as Ant task via Ant's proxy. |
java.lang.String |
getFile()
Get the artifact as a file path. |
long |
getTimeout()
Get timeout (msec). |
java.lang.String |
getUrl()
Get the URL of the artifact as a String. |
boolean |
getWantedStatus()
Get wanted deployment status. |
boolean |
isDeployed()
Checks the deployment status of the specified artifact. |
void |
setFile(java.lang.String file)
Set the artifact as a file path. |
void |
setTimeout(long msec)
Set timeout (msec). |
void |
setUrl(java.lang.String url)
Set the URL of the artifact as a String. |
void |
setWantedStatus(boolean wantedStatus)
Set wanted deployment status. |
boolean |
waitForDeploy(boolean expectedStatus)
Convenience method for "bean mode". Waits for the deployment status to be expectedStatus. |
boolean |
waitForStatus(java.net.URL artifact,
boolean wantedDepStatus,
long timeout)
Waits for the specified goal to be attained or for timeout to occur. |
Methods inherited from class com.maxiq.tools.jboss.JMXBean |
addArgument, addArgument, clearArguments, doExecute, getJbhome, getJndiurl, getLastReturnValue, getMbean, getMethod, getRmijndiname, getServerName, isServerAlive, setetRmijndiname, setJbhome, setJndiurl, setMbean, setMethod, setServerName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JMXDeploymentMonitor()
Method Detail |
public void setUrl(java.lang.String url) throws java.net.MalformedURLException
url
- A String representing an URL in external formjava.net.MalformedURLException
- when the String-URL is not OKpublic java.lang.String getUrl()
public void setFile(java.lang.String file)
file
- String pathpublic java.lang.String getFile()
public void setTimeout(long msec)
msec
- Timeout in msec.public long getTimeout()
public void setWantedStatus(boolean wantedStatus)
wantedStatus
- true
if we wait for the artifact to be deployed,
false
if we wait for the artifact to be undeployed.public boolean getWantedStatus()
public void execute() throws JBossNotAvailable
execute
in class JMXBean
JBossNotAvailable
- when it seems there's no JBoss to talk withpublic boolean isDeployed() throws JBossNotAvailable
true
if currently deployed.public boolean waitForDeploy(boolean expectedStatus) throws JBossNotAvailable
true
when successfulpublic boolean waitForStatus(java.net.URL artifact, boolean wantedDepStatus, long timeout) throws JBossNotAvailable
artifact
- URL of the artifact to be monitoredwantedDepStatus
- The wanted deployment statustimeout
- Timeout value (msec)true
if the wait succeededJBossNotAvailable
- when there's no JBoss to wait for
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |