Package org.apache.catalina.storeconfig
Class ConnectorStoreAppender
java.lang.Object
org.apache.catalina.storeconfig.StoreAppender
org.apache.catalina.storeconfig.ConnectorStoreAppender
Store the Connector attributes. Connector has really special design. A
Connector is only a startup Wrapper for a ProtocolHandler. This meant that
ProtocolHandler get all there attributes from the Connector attribute map.
Strange is that some attributes change there name and the attribute
sslProtocol need a special handling
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected File
protected File
getJkHomeBase
(String jkHome, File appBase) getPropertyKeys
(Connector bean) Get all properties from Connector and current ProtocolHandler.boolean
isPrintValue
(Object bean, Object bean2, String attrName, StoreDescription desc) Print Connector Values.void
printAttributes
(PrintWriter writer, int indent, boolean include, Object bean, StoreDescription desc) Store the relevant attributes of the specified JavaBean.void
printOpenTag
(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) Print the open tag for connector attributes (override).void
printTag
(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) Print a tag for connector attributes (override).void
printValue
(PrintWriter writer, int indent, String name, Object value) Print a value but replace certain attribute names.protected void
storeConnectorAttributes
(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) Print Attributes for the connectorMethods inherited from class org.apache.catalina.storeconfig.StoreAppender
checkAttribute, convertStr, defaultInstance, isPersistable, printAttribute, printAttributes, printCloseTag, printIndent, printTagArray, printTagContent, printTagValueArray
-
Field Details
-
replacements
-
-
Constructor Details
-
ConnectorStoreAppender
public ConnectorStoreAppender()
-
-
Method Details
-
printAttributes
public void printAttributes(PrintWriter writer, int indent, boolean include, Object bean, StoreDescription desc) throws Exception Description copied from class:StoreAppender
Store the relevant attributes of the specified JavaBean.- Overrides:
printAttributes
in classStoreAppender
- Parameters:
writer
- PrintWriter to which we are storingindent
- Indentation levelinclude
- Should we include aclassName
attribute?bean
- Bean whose properties are to be rendered as attributes,desc
- RegistryDescriptor from this bean- Throws:
Exception
- if an exception occurs while storing
-
getPropertyKeys
Get all properties from Connector and current ProtocolHandler.- Parameters:
bean
- The connector- Returns:
- List of Connector property names
- Throws:
IntrospectionException
- Error introspecting connector
-
storeConnectorAttributes
protected void storeConnectorAttributes(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) throws Exception Print Attributes for the connector- Parameters:
aWriter
- Current writerindent
- Indentation levelbean
- The connector beanaDesc
- The connector description- Throws:
Exception
- Store error occurred
-
printOpenTag
public void printOpenTag(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) throws Exception Print the open tag for connector attributes (override).- Overrides:
printOpenTag
in classStoreAppender
- Parameters:
aWriter
- The output writerindent
- Indentation levelbean
- The current bean that is storedaDesc
- Store description of the current element- Throws:
Exception
- A store error occurred- See Also:
-
printTag
public void printTag(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) throws Exception Print a tag for connector attributes (override).- Overrides:
printTag
in classStoreAppender
- Parameters:
aWriter
- The output writerindent
- Indentation levelbean
- The current bean that is storedaDesc
- Store description of the current element- Throws:
Exception
- A store error occurred- See Also:
-
printValue
Print a value but replace certain attribute names.- Overrides:
printValue
in classStoreAppender
- Parameters:
writer
- PrintWriter to which we are storingindent
- Indentation levelname
- Attribute namevalue
- Attribute value- See Also:
-
isPrintValue
Print Connector Values.- Special handling to default jkHome.
- Don't save catalina.base path at server.xml
- Overrides:
isPrintValue
in classStoreAppender
- Parameters:
bean
- original beanbean2
- default beanattrName
- attribute namedesc
- StoreDescription from bean- Returns:
true
if the value should be stored- See Also:
-
getCatalinaBase
-
getJkHomeBase
-