org.rhq.plugins.jbossas
Class JBossASServerComponent

java.lang.Object
  extended by org.rhq.plugins.jbossas.JBossASServerComponent
All Implemented Interfaces:
AvailabilityFacet, ContentFacet, ApplicationServerComponent, CreateChildResourceFacet, ResourceComponent, MeasurementFacet, OperationFacet, SupportFacet, JMXComponent

public class JBossASServerComponent
extends java.lang.Object
implements MeasurementFacet, OperationFacet, JMXComponent, CreateChildResourceFacet, ApplicationServerComponent, ContentFacet, SupportFacet

Supports JBoss 3.2.3 through 4.2.x

Author:
Greg Hinkle, John Mazzitelli, Jason Dobies, Ian Springer

Field Summary
static java.lang.String AVAIL_CHECK_PERIOD_CONFIG_PROP
           
static java.lang.String BINDING_ADDRESS_CONFIG_PROP
           
static java.lang.String CONFIGURATION_PATH_CONFIG_PROP
           
static java.lang.String CONFIGURATION_SET_CONFIG_PROP
           
static java.lang.String JAVA_HOME_PATH_CONFIG_PROP
           
static java.lang.String JBOSS_HOME_DIR_CONFIG_PROP
           
static java.lang.String NAMING_URL_CONFIG_PROP
           
static java.lang.String SCRIPT_PREFIX_CONFIG_PROP
           
static java.lang.String SHUTDOWN_MBEAN_CONFIG_PROP
           
static java.lang.String SHUTDOWN_MBEAN_OPERATION_CONFIG_PROP
           
static java.lang.String SHUTDOWN_METHOD_CONFIG_PROP
           
static java.lang.String SHUTDOWN_SCRIPT_CONFIG_PROP
           
static java.lang.String START_SCRIPT_CONFIG_PROP
           
 
Fields inherited from interface org.rhq.plugins.jmx.JMXComponent
CREDENTIALS_CONFIG_PROP, PRINCIPAL_CONFIG_PROP
 
Constructor Summary
JBossASServerComponent()
           
 
Method Summary
 CreateResourceReport createResource(CreateResourceReport report)
           
 DeployPackagesResponse deployPackages(java.util.Set<ResourcePackageDetails> packages, ContentServices contentServices)
           
 java.util.Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type)
           
 java.util.List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails packageDetails)
           
 AvailabilityType getAvailability()
           
 java.lang.String getBindingAddress()
           
 java.io.File getConfigurationPath()
          Return the absolute path of this JBoss server's configuration directory (e.g.
 java.lang.String getConfigurationSet()
           
 java.io.File getDeploymentFilePath(java.lang.String objectName)
           
 org.mc4j.ems.connection.EmsConnection getEmsConnection()
           
 java.io.File getJavaHomePath()
          Return the absolute path of this JBoss server's JAVA_HOME directory (e.g.
 MainDeployer getMainDeployer()
           
 JBossASServerOperationsDelegate getOperationsDelegate()
          Returns the operation delegate configured against the resource represented by this component.
 Configuration getPluginConfiguration()
           
 java.io.File getShutdownScriptPath()
          Return the absolute path of this JBoss server's shutdown script (e.g.
 SnapshotReportResults getSnapshotReport(SnapshotReportRequest request)
           
 java.io.File getStartScriptPath()
          Return the absolute path of this JBoss server's start script (e.g.
 void getValues(MeasurementReport report, java.util.Set<MeasurementScheduleRequest> requests)
           
 OperationResult invokeOperation(java.lang.String name, Configuration configuration)
           
 RemovePackagesResponse removePackages(java.util.Set<ResourcePackageDetails> packages)
           
 java.io.InputStream retrievePackageBits(ResourcePackageDetails packageDetails)
           
 void start(ResourceContext context)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMING_URL_CONFIG_PROP

public static final java.lang.String NAMING_URL_CONFIG_PROP
See Also:
Constant Field Values

JBOSS_HOME_DIR_CONFIG_PROP

public static final java.lang.String JBOSS_HOME_DIR_CONFIG_PROP
See Also:
Constant Field Values

CONFIGURATION_PATH_CONFIG_PROP

public static final java.lang.String CONFIGURATION_PATH_CONFIG_PROP
See Also:
Constant Field Values

SCRIPT_PREFIX_CONFIG_PROP

public static final java.lang.String SCRIPT_PREFIX_CONFIG_PROP
See Also:
Constant Field Values

CONFIGURATION_SET_CONFIG_PROP

public static final java.lang.String CONFIGURATION_SET_CONFIG_PROP
See Also:
Constant Field Values

START_SCRIPT_CONFIG_PROP

public static final java.lang.String START_SCRIPT_CONFIG_PROP
See Also:
Constant Field Values

SHUTDOWN_SCRIPT_CONFIG_PROP

public static final java.lang.String SHUTDOWN_SCRIPT_CONFIG_PROP
See Also:
Constant Field Values

SHUTDOWN_MBEAN_CONFIG_PROP

public static final java.lang.String SHUTDOWN_MBEAN_CONFIG_PROP
See Also:
Constant Field Values

SHUTDOWN_MBEAN_OPERATION_CONFIG_PROP

public static final java.lang.String SHUTDOWN_MBEAN_OPERATION_CONFIG_PROP
See Also:
Constant Field Values

SHUTDOWN_METHOD_CONFIG_PROP

public static final java.lang.String SHUTDOWN_METHOD_CONFIG_PROP
See Also:
Constant Field Values

JAVA_HOME_PATH_CONFIG_PROP

public static final java.lang.String JAVA_HOME_PATH_CONFIG_PROP
See Also:
Constant Field Values

AVAIL_CHECK_PERIOD_CONFIG_PROP

public static final java.lang.String AVAIL_CHECK_PERIOD_CONFIG_PROP
See Also:
Constant Field Values

BINDING_ADDRESS_CONFIG_PROP

public static final java.lang.String BINDING_ADDRESS_CONFIG_PROP
See Also:
Constant Field Values
Constructor Detail

JBossASServerComponent

public JBossASServerComponent()
Method Detail

start

public void start(ResourceContext context)
           throws java.lang.Exception
Specified by:
start in interface ResourceComponent
Throws:
java.lang.Exception

stop

public void stop()
Specified by:
stop in interface ResourceComponent

getAvailability

public AvailabilityType getAvailability()
Specified by:
getAvailability in interface AvailabilityFacet

getValues

public void getValues(MeasurementReport report,
                      java.util.Set<MeasurementScheduleRequest> requests)
Specified by:
getValues in interface MeasurementFacet

invokeOperation

public OperationResult invokeOperation(java.lang.String name,
                                       Configuration configuration)
                                throws java.lang.InterruptedException
Specified by:
invokeOperation in interface OperationFacet
Throws:
java.lang.InterruptedException

generateInstallationSteps

public java.util.List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails packageDetails)
Specified by:
generateInstallationSteps in interface ContentFacet

deployPackages

public DeployPackagesResponse deployPackages(java.util.Set<ResourcePackageDetails> packages,
                                             ContentServices contentServices)
Specified by:
deployPackages in interface ContentFacet

removePackages

public RemovePackagesResponse removePackages(java.util.Set<ResourcePackageDetails> packages)
Specified by:
removePackages in interface ContentFacet

discoverDeployedPackages

public java.util.Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type)
Specified by:
discoverDeployedPackages in interface ContentFacet

retrievePackageBits

public java.io.InputStream retrievePackageBits(ResourcePackageDetails packageDetails)
Specified by:
retrievePackageBits in interface ContentFacet

createResource

public CreateResourceReport createResource(CreateResourceReport report)
Specified by:
createResource in interface CreateChildResourceFacet

getSnapshotReport

public SnapshotReportResults getSnapshotReport(SnapshotReportRequest request)
                                        throws java.lang.Exception
Specified by:
getSnapshotReport in interface SupportFacet
Throws:
java.lang.Exception

getEmsConnection

public org.mc4j.ems.connection.EmsConnection getEmsConnection()
Specified by:
getEmsConnection in interface JMXComponent

getConfigurationPath

@NotNull
public java.io.File getConfigurationPath()
Return the absolute path of this JBoss server's configuration directory (e.g. "C:\opt\jboss-4.2.2.GA\server\default").

Specified by:
getConfigurationPath in interface ApplicationServerComponent
Returns:
the absolute path of this JBoss server's configuration directory (e.g. "C:\opt\jboss-4.2.2.GA\server\default")

getPluginConfiguration

public Configuration getPluginConfiguration()

getDeploymentFilePath

public java.io.File getDeploymentFilePath(java.lang.String objectName)

getConfigurationSet

public java.lang.String getConfigurationSet()

getStartScriptPath

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

Returns:
the absolute path of this JBoss server's start script (e.g. "C:\opt\jboss-4.2.1.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-4.2.1.GA\bin\shutdown.sh").

Returns:
the absolute path of this JBoss server's shutdown script (e.g. "C:\opt\jboss-4.2.1.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

getBindingAddress

@NotNull
public java.lang.String getBindingAddress()

getMainDeployer

public MainDeployer getMainDeployer()

getOperationsDelegate

@NotNull
public JBossASServerOperationsDelegate getOperationsDelegate()
Returns the operation delegate configured against the resource represented by this component.

Returns:
will not be null


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