org.rhq.plugins.apache.util
Class RuntimeApacheConfiguration

java.lang.Object
  extended by org.rhq.plugins.apache.util.RuntimeApacheConfiguration

public class RuntimeApacheConfiguration
extends Object

Author:
Lukas Krejci

Nested Class Summary
static class RuntimeApacheConfiguration.NodeInspectionResult
          A result of a node inspection using RuntimeApacheConfiguration.NodeInspector
static class RuntimeApacheConfiguration.NodeInspector
          Node inspector is used to determine how to proceed with the parsing of the configuration file.
static interface RuntimeApacheConfiguration.NodeVisitor<T>
          This is a node visitor interface to be implemented by the users of the RuntimeApacheConfiguration#walkRuntimeConfig(ApacheAugeasTree, ProcessInfo, ApacheBinaryInfo, Map) or RuntimeApacheConfiguration#walkRuntimeConfig(ApacheDirectiveTree, ProcessInfo, ApacheBinaryInfo, Map) methods.
 
Method Summary
static ApacheDirectiveTree extract(ApacheDirectiveTree tree, ProcessInfo httpdProcessInfo, ApacheBinaryInfo httpdBinaryInfo, Map<String,String> moduleNames, boolean suppressUnknownModuleWarnings)
          Given the apache configuration and information about the parameters httpd was executed with this method provides the directive tree that corresponds to the actual runtime configuration as used by httpd.
static RuntimeApacheConfiguration.NodeInspector getNodeInspector(ProcessInfo httpdProcessInfo, ApacheBinaryInfo httpdBinaryInfo, Map<String,String> moduleNames, boolean suppressUnknownModuleWarnings)
           
static void walkRuntimeConfig(RuntimeApacheConfiguration.NodeVisitor<ApacheDirective> visitor, ApacheDirectiveTree tree, ProcessInfo httpdProcessInfo, ApacheBinaryInfo httpdBinaryInfo, Map<String,String> moduleNames, boolean suppressUnknownModuleWarnings)
           
static void walkRuntimeConfig(RuntimeApacheConfiguration.NodeVisitor<AugeasNode> visitor, AugeasTree tree, ProcessInfo httpdProcessInfo, ApacheBinaryInfo httpdBinaryInfo, Map<String,String> moduleNames, boolean suppressUnknownModuleWarnings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNodeInspector

public static RuntimeApacheConfiguration.NodeInspector getNodeInspector(ProcessInfo httpdProcessInfo,
                                                                        ApacheBinaryInfo httpdBinaryInfo,
                                                                        Map<String,String> moduleNames,
                                                                        boolean suppressUnknownModuleWarnings)

extract

public static ApacheDirectiveTree extract(ApacheDirectiveTree tree,
                                          ProcessInfo httpdProcessInfo,
                                          ApacheBinaryInfo httpdBinaryInfo,
                                          Map<String,String> moduleNames,
                                          boolean suppressUnknownModuleWarnings)
Given the apache configuration and information about the parameters httpd was executed with this method provides the directive tree that corresponds to the actual runtime configuration as used by httpd.

This enables us to see which directives are actually in effect as opposed to just declared.

Parameters:
tree -
httpdProcessInfo -
httpdBinaryInfo -
moduleNames - the mapping from the module filename to the module name (i.e. mapping from the name used in IfModule to the name used in LoadModule)
suppressUnknownModuleWarnings - true if the method should suppress logging the warnings about unknown modules
Returns:
a new directive tree that represents the runtime configuration

walkRuntimeConfig

public static void walkRuntimeConfig(RuntimeApacheConfiguration.NodeVisitor<ApacheDirective> visitor,
                                     ApacheDirectiveTree tree,
                                     ProcessInfo httpdProcessInfo,
                                     ApacheBinaryInfo httpdBinaryInfo,
                                     Map<String,String> moduleNames,
                                     boolean suppressUnknownModuleWarnings)

walkRuntimeConfig

public static void walkRuntimeConfig(RuntimeApacheConfiguration.NodeVisitor<AugeasNode> visitor,
                                     AugeasTree tree,
                                     ProcessInfo httpdProcessInfo,
                                     ApacheBinaryInfo httpdBinaryInfo,
                                     Map<String,String> moduleNames,
                                     boolean suppressUnknownModuleWarnings)


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