org.jboss.on.plugins.tomcat
Class TomcatConnectorComponent

java.lang.Object
  extended by org.rhq.plugins.jmx.MBeanResourceComponent<TomcatServerComponent<?>>
      extended by org.jboss.on.plugins.tomcat.TomcatConnectorComponent
All Implemented Interfaces:
AvailabilityFacet, ConfigurationFacet, ResourceComponent<TomcatServerComponent<?>>, MeasurementFacet, OperationFacet, JMXComponent<TomcatServerComponent<?>>

public class TomcatConnectorComponent
extends MBeanResourceComponent<TomcatServerComponent<?>>

Plugin component for representing Tomcat connectors. Much of the functionality is left to the super class, however the metrics required special handling.

Author:
Jay Shaughnessy, Jason Dobies

Field Summary
static String CONFIG_PROTOCOL
          property name for the protocol of the connector
static String CONFIG_V5_KEEP_ALIVE_TIMEOUT
          V5 only property
static String PLUGIN_CONFIG_ADDRESS
          Plugin property name for the address the connector is bound to.
static String PLUGIN_CONFIG_HANDLER
          Plugin property name for the protocol handler.
static String PLUGIN_CONFIG_PORT
          Plugin property name for the port the connector is listening on.
static String UNKNOWN
           
 
Fields inherited from class org.rhq.plugins.jmx.MBeanResourceComponent
bean, OBJECT_NAME_PROP, PROPERTY_TRANSFORM, resourceContext
 
Fields inherited from interface org.rhq.plugins.jmx.JMXComponent
CREDENTIALS_CONFIG_PROP, PRINCIPAL_CONFIG_PROP
 
Constructor Summary
TomcatConnectorComponent()
           
 
Method Summary
protected  String getAttributeName(String property)
          Get the real name of the passed property for a concrete connector.
 org.rhq.core.domain.measurement.AvailabilityType getAvailability()
           
 void getValues(org.rhq.core.domain.measurement.MeasurementReport report, Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
           
 void start(ResourceContext<TomcatServerComponent<?>> context)
           
 void updateResourceConfiguration(ConfigurationUpdateReport report)
           
 
Methods inherited from class org.rhq.plugins.jmx.MBeanResourceComponent
getAttributeProperty, getBeanProperties, getEmsBean, getEmsConnection, getPropertyValueAsType, getResourceContext, getValues, invokeOperation, invokeOperation, loadBean, loadBean, loadResourceConfiguration, lookupAttributeProperty, setEmsBean, setResourceContext, stop, transformBeanName, updateResourceConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_PROTOCOL

public static final String CONFIG_PROTOCOL
property name for the protocol of the connector

See Also:
Constant Field Values

CONFIG_V5_KEEP_ALIVE_TIMEOUT

public static final String CONFIG_V5_KEEP_ALIVE_TIMEOUT
V5 only property

See Also:
Constant Field Values

PLUGIN_CONFIG_ADDRESS

public static final String PLUGIN_CONFIG_ADDRESS
Plugin property name for the address the connector is bound to.

See Also:
Constant Field Values

PLUGIN_CONFIG_HANDLER

public static final String PLUGIN_CONFIG_HANDLER
Plugin property name for the protocol handler. This prefix is used in the associated GlobalRequestProcessor object name.

See Also:
Constant Field Values

PLUGIN_CONFIG_PORT

public static final String PLUGIN_CONFIG_PORT
Plugin property name for the port the connector is listening on.

See Also:
Constant Field Values

UNKNOWN

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

TomcatConnectorComponent

public TomcatConnectorComponent()
Method Detail

getAvailability

public org.rhq.core.domain.measurement.AvailabilityType getAvailability()
Specified by:
getAvailability in interface AvailabilityFacet
Overrides:
getAvailability in class MBeanResourceComponent<TomcatServerComponent<?>>

start

public void start(ResourceContext<TomcatServerComponent<?>> context)
Specified by:
start in interface ResourceComponent<TomcatServerComponent<?>>
Overrides:
start in class MBeanResourceComponent<TomcatServerComponent<?>>

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
Overrides:
getValues in class MBeanResourceComponent<TomcatServerComponent<?>>

getAttributeName

protected String getAttributeName(String property)
Get the real name of the passed property for a concrete connector. The actual object name will begin with: Catalina:type=GlobalRequestProcessor,name=handler[-address]-port. We need to substitute in the address and port of this particular connector before the value can be read. In the plugin descriptor, these are written as %handler%, %address% and %port% respectively, so we can replace on those.

Overrides:
getAttributeName in class MBeanResourceComponent<TomcatServerComponent<?>>

updateResourceConfiguration

public void updateResourceConfiguration(ConfigurationUpdateReport report)
Specified by:
updateResourceConfiguration in interface ConfigurationFacet
Overrides:
updateResourceConfiguration in class MBeanResourceComponent<TomcatServerComponent<?>>


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