org.rhq.plugins.apache
Class ApacheVirtualHostServiceComponent

java.lang.Object
  extended by org.rhq.plugins.apache.ApacheVirtualHostServiceComponent
All Implemented Interfaces:
AvailabilityFacet, ConfigurationFacet, ConfigurationFacetSupport, CreateChildResourceFacet, DeleteResourceFacet, ResourceComponent<ApacheServerComponent>, MeasurementFacet

public class ApacheVirtualHostServiceComponent
extends Object
implements ResourceComponent<ApacheServerComponent>, MeasurementFacet, ConfigurationFacet, DeleteResourceFacet, CreateChildResourceFacet

Author:
Ian Springer, Lukas Krejci

Field Summary
static String FAILED_UPGRADE_RESOURCE_KEY_PREFIX
           
static String MAIN_SERVER_RESOURCE_KEY
           
static String RESOURCE_TYPE_NAME
           
static String RESPONSE_TIME_LOG_FILE_CONFIG_PROP
           
static String RESPONSE_TIME_URL_EXCLUDES_CONFIG_PROP
           
static String RESPONSE_TIME_URL_TRANSFORMS_CONFIG_PROP
           
static String SERVER_NAME_CONFIG_PROP
           
static String URL_CONFIG_PROP
           
 
Constructor Summary
ApacheVirtualHostServiceComponent()
           
 
Method Summary
 void conditionalRestart()
           
 CreateResourceReport createResource(CreateResourceReport report)
           
 void deleteEmptyFile(AugeasTree tree, AugeasNode deletedNode)
           
 void deleteResource()
           
 void finishConfigurationUpdate(ConfigurationUpdateReport report)
           
 AvailabilityType getAvailability()
           
 AugeasNode getNode(AugeasTree tree)
          Returns a node corresponding to this component in the Augeas tree.
 AugeasTree getServerConfigurationTree()
           
 void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> schedules)
           
static int getWwwServiceIndex(ApacheServerComponent parent, String resourceKey)
           
 boolean isAugeasEnabled()
           
 ApacheDirectiveTree loadParser()
           
 Configuration loadResourceConfiguration()
           
 void start(ResourceContext<ApacheServerComponent> resourceContext)
           
 void stop()
           
 void updateResourceConfiguration(ConfigurationUpdateReport report)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URL_CONFIG_PROP

public static final String URL_CONFIG_PROP
See Also:
Constant Field Values

MAIN_SERVER_RESOURCE_KEY

public static final String MAIN_SERVER_RESOURCE_KEY
See Also:
Constant Field Values

FAILED_UPGRADE_RESOURCE_KEY_PREFIX

public static final String FAILED_UPGRADE_RESOURCE_KEY_PREFIX
See Also:
Constant Field Values

RESPONSE_TIME_LOG_FILE_CONFIG_PROP

public static final String RESPONSE_TIME_LOG_FILE_CONFIG_PROP
See Also:
Constant Field Values

RESPONSE_TIME_URL_EXCLUDES_CONFIG_PROP

public static final String RESPONSE_TIME_URL_EXCLUDES_CONFIG_PROP
See Also:
Constant Field Values

RESPONSE_TIME_URL_TRANSFORMS_CONFIG_PROP

public static final String RESPONSE_TIME_URL_TRANSFORMS_CONFIG_PROP
See Also:
Constant Field Values

SERVER_NAME_CONFIG_PROP

public static final String SERVER_NAME_CONFIG_PROP
See Also:
Constant Field Values

RESOURCE_TYPE_NAME

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

ApacheVirtualHostServiceComponent

public ApacheVirtualHostServiceComponent()
Method Detail

start

public void start(ResourceContext<ApacheServerComponent> resourceContext)
           throws Exception
Specified by:
start in interface ResourceComponent<ApacheServerComponent>
Throws:
Exception

stop

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

getAvailability

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

loadResourceConfiguration

public Configuration loadResourceConfiguration()
                                        throws Exception
Specified by:
loadResourceConfiguration in interface ConfigurationFacet
Throws:
Exception

updateResourceConfiguration

public void updateResourceConfiguration(ConfigurationUpdateReport report)
Specified by:
updateResourceConfiguration in interface ConfigurationFacet

deleteResource

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

getValues

public void getValues(MeasurementReport report,
                      Set<MeasurementScheduleRequest> schedules)
               throws Exception
Specified by:
getValues in interface MeasurementFacet
Throws:
Exception

createResource

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

getServerConfigurationTree

public AugeasTree getServerConfigurationTree()

getNode

public AugeasNode getNode(AugeasTree tree)
Returns a node corresponding to this component in the Augeas tree.

Parameters:
tree -
Returns:
Throws:
IllegalStateException - if none or more than one nodes found

finishConfigurationUpdate

public void finishConfigurationUpdate(ConfigurationUpdateReport report)
See Also:
ApacheServerComponent.finishConfigurationUpdate(ConfigurationUpdateReport)

conditionalRestart

public void conditionalRestart()
                        throws Exception
Throws:
Exception
See Also:
ApacheServerComponent.conditionalRestart()

deleteEmptyFile

public void deleteEmptyFile(AugeasTree tree,
                            AugeasNode deletedNode)

getWwwServiceIndex

public static int getWwwServiceIndex(ApacheServerComponent parent,
                                     String resourceKey)

loadParser

public ApacheDirectiveTree loadParser()
                               throws Exception
Throws:
Exception

isAugeasEnabled

public boolean isAugeasEnabled()


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