org.rhq.plugins.jbossas5
Class ApplicationServerOperationsDelegate

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

public class ApplicationServerOperationsDelegate
extends java.lang.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, SystemInfo systemInfo)
           
 
Method Summary
 java.io.File getJavaHomePath()
          Return the absolute path of this JBoss server's JAVA_HOME directory (e.g.
 java.io.File getShutdownScriptPath()
          Return the absolute path of this JBoss server's shutdown script (e.g.
 java.io.File getStartScriptPath()
          Return the absolute path of this JBoss server's start script (e.g.
 OperationResult invoke(ApplicationServerSupportedOperations operation, 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,
                                           SystemInfo systemInfo)
Method Detail

invoke

public OperationResult invoke(ApplicationServerSupportedOperations operation,
                              Configuration parameters)
                       throws java.lang.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:
java.lang.RuntimeException - if any errors occur while trying to perform the operation
java.lang.InterruptedException

getStartScriptPath

@NotNull
public java.io.File getStartScriptPath()
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 java.io.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 java.io.File getJavaHomePath()
Return the absolute path of this JBoss server's JAVA_HOME directory (e.g. "C:\opt\jdk1.5.0_14"); will only return null in the rare case when the "java.home" system property is not set, and when this is the case, a warning will be logged.

Returns:
the absolute path of this JBoss server's JAVA_HOME directory (e.g. "C:\opt\jdk1.5.0_14"); will only be null in the rare case when the "java.home" system property is not set


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