org.rhq.plugins.jbossas5
Class ApplicationServerOperationsDelegate

java.lang.Object
  extended by org.rhq.plugins.jbossas5.ApplicationServerOperationsDelegate

public class ApplicationServerOperationsDelegate
extends Object

Handles performing operations (Start, Shut Down, and Restart) on a JBoss AS 5.x instance.

Author:
Ian Springer, Jason Dobies, Jay Shaughnessy

Constructor Summary
ApplicationServerOperationsDelegate(ApplicationServerComponent serverComponent)
           
 
Method Summary
 File getJavaHomePath()
          Return the absolute path of this JBoss server's JAVA_HOME directory (e.g.
 File getShutdownScriptPath()
          Return the absolute path of this JBoss server's shutdown script (e.g.
 File getStartScriptPath(StartScriptConfiguration startScriptConfig)
          Return the absolute path of this JBoss server's start script (e.g.
 OperationResult invoke(ApplicationServerSupportedOperations operation, org.rhq.core.domain.configuration.Configuration parameters)
          Performs the specified operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationServerOperationsDelegate

public ApplicationServerOperationsDelegate(ApplicationServerComponent serverComponent)
Method Detail

invoke

public OperationResult invoke(ApplicationServerSupportedOperations operation,
                              org.rhq.core.domain.configuration.Configuration parameters)
                       throws InterruptedException
Performs the specified operation. The result of the operation will be indicated in the return. If there is an error, an RuntimeException will be thrown.

Parameters:
operation - the operation to perform
parameters - parameters to the operation call
Returns:
if successful, the result object will contain a success message
Throws:
RuntimeException - if any errors occur while trying to perform the operation
InterruptedException

getStartScriptPath

@NotNull
public File getStartScriptPath(StartScriptConfiguration startScriptConfig)
Return the absolute path of this JBoss server's start script (e.g. "C:\opt\jboss-5.1.0.GA\bin\run.sh").

Returns:
the absolute path of this JBoss server's start script (e.g. "C:\opt\jboss-5.1.0.GA\bin\run.sh")

getShutdownScriptPath

@NotNull
public File getShutdownScriptPath()
Return the absolute path of this JBoss server's shutdown script (e.g. "C:\opt\jboss-5.1.0.GA\bin\shutdown.sh").

Returns:
the absolute path of this JBoss server's shutdown script (e.g. "C:\opt\jboss-5.1.0.GA\bin\shutdown.sh")

getJavaHomePath

@Nullable
public File getJavaHomePath()
Return the absolute path of this JBoss server's JAVA_HOME directory (e.g. "C:\opt\jdk1.5.0_14"), as defined by the 'javaHome' plugin config prop, or null if that prop is not set.

Returns:
the absolute path of this JBoss server's JAVA_HOME directory, as defined by the 'javaHome' plugin config prop, or null if that prop is not set


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.