org.rhq.plugins.jbossas
Class JBossASServerComponent<T extends ResourceComponent<?>>

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

public class JBossASServerComponent<T extends ResourceComponent<?>>
extends Object
implements MeasurementFacet, OperationFacet, JMXComponent<T>, CreateChildResourceFacet, ApplicationServerComponent, ContentFacet, SupportFacet

Resource component for managing JBoss AS 3.2.3 through 4.2.x, and JBoss EAP and SOA-P 4.x.

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

Field Summary
static String AVAIL_CHECK_PERIOD_CONFIG_PROP
           
static String BINDING_ADDRESS_CONFIG_PROP
           
static String CONFIGURATION_PATH_CONFIG_PROP
           
static String CONFIGURATION_SET_CONFIG_PROP
           
static String JAVA_HOME_PATH_CONFIG_PROP
           
static String JBOSS_HOME_DIR_CONFIG_PROP
           
static String NAMING_URL_CONFIG_PROP
           
static String SCRIPT_PREFIX_CONFIG_PROP
           
static String SHUTDOWN_MBEAN_CONFIG_PROP
           
static String SHUTDOWN_MBEAN_OPERATION_CONFIG_PROP
           
static String SHUTDOWN_METHOD_CONFIG_PROP
           
static String SHUTDOWN_SCRIPT_CONFIG_PROP
           
static String START_SCRIPT_CONFIG_PROP
           
static String START_WAIT_MAX_PROP
           
static String STOP_WAIT_MAX_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)
           
 org.rhq.core.domain.content.transfer.DeployPackagesResponse deployPackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages, ContentServices contentServices)
           
 Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> discoverDeployedPackages(org.rhq.core.domain.content.PackageType type)
           
 List<org.rhq.core.domain.content.transfer.DeployPackageStep> generateInstallationSteps(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
           
 org.rhq.core.domain.measurement.AvailabilityType getAvailability()
           
 String getBindingAddress()
           
 File getConfigurationPath()
          Return the absolute path of this JBoss server's configuration directory (e.g.
 String getConfigurationSet()
           
 File getDeploymentFilePath(String objectName)
           
 org.mc4j.ems.connection.EmsConnection getEmsConnection()
           
 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.
 org.rhq.core.domain.configuration.Configuration getPluginConfiguration()
           
 File getShutdownScriptPath()
          Return the absolute path of this JBoss server's shutdown script (e.g.
 SnapshotReportResults getSnapshotReport(SnapshotReportRequest request)
           
 File getStartScriptPath()
          Return the absolute path of this JBoss server's start script (e.g.
 void getValues(org.rhq.core.domain.measurement.MeasurementReport report, Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
           
 OperationResult invokeOperation(String name, org.rhq.core.domain.configuration.Configuration configuration)
           
 org.rhq.core.domain.content.transfer.RemovePackagesResponse removePackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages)
           
 InputStream retrievePackageBits(org.rhq.core.domain.content.transfer.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 String NAMING_URL_CONFIG_PROP
See Also:
Constant Field Values

JBOSS_HOME_DIR_CONFIG_PROP

public static final String JBOSS_HOME_DIR_CONFIG_PROP
See Also:
Constant Field Values

CONFIGURATION_PATH_CONFIG_PROP

public static final String CONFIGURATION_PATH_CONFIG_PROP
See Also:
Constant Field Values

SCRIPT_PREFIX_CONFIG_PROP

public static final String SCRIPT_PREFIX_CONFIG_PROP
See Also:
Constant Field Values

CONFIGURATION_SET_CONFIG_PROP

public static final String CONFIGURATION_SET_CONFIG_PROP
See Also:
Constant Field Values

START_SCRIPT_CONFIG_PROP

public static final String START_SCRIPT_CONFIG_PROP
See Also:
Constant Field Values

START_WAIT_MAX_PROP

public static final String START_WAIT_MAX_PROP
See Also:
Constant Field Values

STOP_WAIT_MAX_PROP

public static final String STOP_WAIT_MAX_PROP
See Also:
Constant Field Values

SHUTDOWN_SCRIPT_CONFIG_PROP

public static final String SHUTDOWN_SCRIPT_CONFIG_PROP
See Also:
Constant Field Values

SHUTDOWN_MBEAN_CONFIG_PROP

public static final String SHUTDOWN_MBEAN_CONFIG_PROP
See Also:
Constant Field Values

SHUTDOWN_MBEAN_OPERATION_CONFIG_PROP

public static final String SHUTDOWN_MBEAN_OPERATION_CONFIG_PROP
See Also:
Constant Field Values

SHUTDOWN_METHOD_CONFIG_PROP

public static final String SHUTDOWN_METHOD_CONFIG_PROP
See Also:
Constant Field Values

JAVA_HOME_PATH_CONFIG_PROP

public static final String JAVA_HOME_PATH_CONFIG_PROP
See Also:
Constant Field Values

AVAIL_CHECK_PERIOD_CONFIG_PROP

public static final String AVAIL_CHECK_PERIOD_CONFIG_PROP
See Also:
Constant Field Values

BINDING_ADDRESS_CONFIG_PROP

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

JBossASServerComponent

public JBossASServerComponent()
Method Detail

start

public void start(ResourceContext context)
           throws Exception
Specified by:
start in interface ResourceComponent<T extends ResourceComponent<?>>
Throws:
Exception

stop

public void stop()
Specified by:
stop in interface ResourceComponent<T extends ResourceComponent<?>>

getAvailability

public org.rhq.core.domain.measurement.AvailabilityType getAvailability()
Specified by:
getAvailability in interface AvailabilityFacet

getValues

public void getValues(org.rhq.core.domain.measurement.MeasurementReport report,
                      Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
Specified by:
getValues in interface MeasurementFacet

invokeOperation

public OperationResult invokeOperation(String name,
                                       org.rhq.core.domain.configuration.Configuration configuration)
                                throws InterruptedException
Specified by:
invokeOperation in interface OperationFacet
Throws:
InterruptedException

generateInstallationSteps

public List<org.rhq.core.domain.content.transfer.DeployPackageStep> generateInstallationSteps(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
Specified by:
generateInstallationSteps in interface ContentFacet

deployPackages

public org.rhq.core.domain.content.transfer.DeployPackagesResponse deployPackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages,
                                                                                  ContentServices contentServices)
Specified by:
deployPackages in interface ContentFacet

removePackages

public org.rhq.core.domain.content.transfer.RemovePackagesResponse removePackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages)
Specified by:
removePackages in interface ContentFacet

discoverDeployedPackages

public Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> discoverDeployedPackages(org.rhq.core.domain.content.PackageType type)
Specified by:
discoverDeployedPackages in interface ContentFacet

retrievePackageBits

public InputStream retrievePackageBits(org.rhq.core.domain.content.transfer.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 Exception
Specified by:
getSnapshotReport in interface SupportFacet
Throws:
Exception

getEmsConnection

public org.mc4j.ems.connection.EmsConnection getEmsConnection()
Specified by:
getEmsConnection in interface JMXComponent<T extends ResourceComponent<?>>

getConfigurationPath

@NotNull
public 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 org.rhq.core.domain.configuration.Configuration getPluginConfiguration()

getDeploymentFilePath

public File getDeploymentFilePath(String objectName)

getConfigurationSet

public String getConfigurationSet()

getStartScriptPath

@NotNull
public 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 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 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 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-2012 Red Hat, Inc.. All Rights Reserved.