org.rhq.plugins.jbossas5.script
Class ScriptComponent

java.lang.Object
  extended by org.rhq.plugins.jbossas5.script.ScriptComponent
All Implemented Interfaces:
AvailabilityFacet, ContentFacet, DeleteResourceFacet, ResourceComponent<ApplicationServerComponent<?>>, OperationFacet

public class ScriptComponent
extends Object
implements ResourceComponent<ApplicationServerComponent<?>>, OperationFacet, DeleteResourceFacet, ContentFacet

A JON service that provides the ability to execute a script.

Author:
Ian Springer, Lukas Krejci

Field Summary
static String COMMAND_LINE_ARGUMENTS_PARAM_PROP
           
static String ENVIRONMENT_VARIABLES_CONFIG_PROP
           
static String EXECUTE_OPERATION
           
static String PACKAGE_TYPE
           
static String PATH_CONFIG_PROP
           
static String TYPE_NAME
           
 
Constructor Summary
ScriptComponent()
           
 
Method Summary
 void deleteResource()
           
 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()
           
 OperationResult invokeOperation(String name, org.rhq.core.domain.configuration.Configuration params)
           
 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<ApplicationServerComponent<?>> resourceContext)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final String TYPE_NAME
See Also:
Constant Field Values

PACKAGE_TYPE

public static final String PACKAGE_TYPE
See Also:
Constant Field Values

PATH_CONFIG_PROP

public static final String PATH_CONFIG_PROP
See Also:
Constant Field Values

ENVIRONMENT_VARIABLES_CONFIG_PROP

public static final String ENVIRONMENT_VARIABLES_CONFIG_PROP
See Also:
Constant Field Values

EXECUTE_OPERATION

public static final String EXECUTE_OPERATION
See Also:
Constant Field Values

COMMAND_LINE_ARGUMENTS_PARAM_PROP

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

ScriptComponent

public ScriptComponent()
Method Detail

start

public void start(ResourceContext<ApplicationServerComponent<?>> resourceContext)
Specified by:
start in interface ResourceComponent<ApplicationServerComponent<?>>

stop

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

getAvailability

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

invokeOperation

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

deleteResource

public void deleteResource()
                    throws Exception
Specified by:
deleteResource in interface DeleteResourceFacet
Throws:
Exception

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


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