Package org.jboss.logmanager.config
Class HandlerConfigurationImpl
- java.lang.Object
-
- org.jboss.logmanager.config.AbstractBasicConfiguration<T,C>
-
- org.jboss.logmanager.config.AbstractPropertyConfiguration<java.util.logging.Handler,HandlerConfigurationImpl>
-
- org.jboss.logmanager.config.HandlerConfigurationImpl
-
- All Implemented Interfaces:
HandlerConfiguration,HandlerContainingConfigurable,NamedConfigurable,ObjectConfigurable,PropertyConfigurable
final class HandlerConfigurationImpl extends AbstractPropertyConfiguration<java.util.logging.Handler,HandlerConfigurationImpl> implements HandlerConfiguration
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.logmanager.config.AbstractPropertyConfiguration
AbstractPropertyConfiguration.ConstructAction, AbstractPropertyConfiguration.ModuleFinder
-
-
Field Summary
Fields Modifier and Type Field Description private ValueExpression<java.lang.String>encodingprivate ValueExpression<java.lang.String>errorManagerNameprivate ValueExpression<java.lang.String>filterprivate ValueExpression<java.lang.String>formatterNameprivate java.util.List<java.lang.String>handlerNamesprivate ValueExpression<java.lang.String>level-
Fields inherited from class org.jboss.logmanager.config.AbstractBasicConfiguration
configs, refs
-
-
Constructor Summary
Constructors Constructor Description HandlerConfigurationImpl(LogContextConfigurationImpl configuration, java.lang.String name, java.lang.String moduleName, java.lang.String className, java.lang.String[] constructorProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddHandlerName(java.lang.String name)Add a handler name to this logger.(package private) ConfigAction<java.util.logging.Handler>getConstructAction()(package private) java.lang.StringgetDescription()java.lang.StringgetEncoding()ValueExpression<java.lang.String>getEncodingValueExpression()Returns the encoding which may be an expression.java.lang.StringgetErrorManagerName()ValueExpression<java.lang.String>getErrorManagerNameValueExpression()Returns the error manager name which may be an expression.java.lang.StringgetFilter()ValueExpression<java.lang.String>getFilterValueExpression()Returns a filter that may be an expression.java.lang.StringgetFormatterName()Get the name of the configured formatter for this handler.ValueExpression<java.lang.String>getFormatterNameValueExpression()Gets the formatter name which may be an expression.java.util.List<java.lang.String>getHandlerNames()Get the names of the configured handlers.java.lang.StringgetLevel()Gets the level set on the handler.ValueExpression<java.lang.String>getLevelValueExpression()Returns the level that may be an expression.(package private) ConfigAction<java.lang.Void>getRemoveAction()booleanremoveHandlerName(java.lang.String name)Remove a handler name from this logger.voidsetEncoding(java.lang.String encoding)voidsetEncoding(java.lang.String expression, java.lang.String value)Sets the expression value for the encoding.private voidsetEncoding(ValueExpression<java.lang.String> expression)voidsetErrorManagerName(java.lang.String errorManagerName)voidsetErrorManagerName(java.lang.String expression, java.lang.String value)Sets the expression value for the error manager name.private voidsetErrorManagerName(ValueExpression<java.lang.String> expression)voidsetFilter(java.lang.String filter)voidsetFilter(java.lang.String expression, java.lang.String value)Sets the expression value and for the filter.private voidsetFilter(ValueExpression<java.lang.String> expression)voidsetFormatterName(java.lang.String formatterName)Set the name of the configured formatter for this handler.voidsetFormatterName(java.lang.String expression, java.lang.String value)Sets the expression value for the formatter name.private voidsetFormatterName(ValueExpression<java.lang.String> expression)voidsetHandlerNames(java.lang.String... names)Set the names of the configured handlers.voidsetHandlerNames(java.util.Collection<java.lang.String> names)Set the names of the configured handlers.voidsetLevel(java.lang.String level)Sets the level on the handler.voidsetLevel(java.lang.String expression, java.lang.String level)Sets the expression value for the level.private voidsetLevelValueExpression(ValueExpression<java.lang.String> expression)-
Methods inherited from class org.jboss.logmanager.config.AbstractPropertyConfiguration
addPostConfigurationActions, addPostConfigurationMethod, contains, getActualClass, getClassName, getConstructorProperties, getConstructorPropertyType, getModuleName, getPostConfigurationMethods, getPropertyGetter, getPropertyNames, getPropertySetter, getPropertyType, getPropertyValueExpression, getPropertyValueString, hasConstructorProperty, hasProperty, removePostConfigurationActions, removePostConfigurationMethod, removeProperty, setPostConfigurationMethods, setPostConfigurationMethods, setPropertyValueExpression, setPropertyValueExpression, setPropertyValueString
-
Methods inherited from class org.jboss.logmanager.config.AbstractBasicConfiguration
clearRemoved, getConfigs, getConfiguration, getName, getRefs, isRemoved, setRemoved
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.logmanager.config.NamedConfigurable
getName
-
Methods inherited from interface org.jboss.logmanager.config.ObjectConfigurable
getClassName, getModuleName
-
Methods inherited from interface org.jboss.logmanager.config.PropertyConfigurable
addPostConfigurationMethod, getConstructorProperties, getPostConfigurationMethods, getPropertyNames, getPropertyValueExpression, getPropertyValueString, hasConstructorProperty, hasProperty, removePostConfigurationMethod, removeProperty, setPostConfigurationMethods, setPostConfigurationMethods, setPropertyValueExpression, setPropertyValueExpression, setPropertyValueString
-
-
-
-
Field Detail
-
handlerNames
private final java.util.List<java.lang.String> handlerNames
-
formatterName
private ValueExpression<java.lang.String> formatterName
-
level
private ValueExpression<java.lang.String> level
-
filter
private ValueExpression<java.lang.String> filter
-
encoding
private ValueExpression<java.lang.String> encoding
-
errorManagerName
private ValueExpression<java.lang.String> errorManagerName
-
-
Constructor Detail
-
HandlerConfigurationImpl
HandlerConfigurationImpl(LogContextConfigurationImpl configuration, java.lang.String name, java.lang.String moduleName, java.lang.String className, java.lang.String[] constructorProperties)
-
-
Method Detail
-
getFormatterName
public java.lang.String getFormatterName()
Description copied from interface:HandlerConfigurationGet the name of the configured formatter for this handler.- Specified by:
getFormatterNamein interfaceHandlerConfiguration- Returns:
- the formatter name
-
getFormatterNameValueExpression
public ValueExpression<java.lang.String> getFormatterNameValueExpression()
Description copied from interface:HandlerConfigurationGets the formatter name which may be an expression.- Specified by:
getFormatterNameValueExpressionin interfaceHandlerConfiguration- Returns:
- the formatter name
-
setFormatterName
public void setFormatterName(java.lang.String formatterName)
Description copied from interface:HandlerConfigurationSet the name of the configured formatter for this handler.- Specified by:
setFormatterNamein interfaceHandlerConfiguration- Parameters:
formatterName- the formatter name
-
setFormatterName
public void setFormatterName(java.lang.String expression, java.lang.String value)Description copied from interface:HandlerConfigurationSets the expression value for the formatter name. This method will not parse the expression for the value and instead use thelevelparameter for the formatter name on the handler.- Specified by:
setFormatterNamein interfaceHandlerConfiguration- Parameters:
expression- the expression used to resolve the levelvalue- the value to set the formatter name to- See Also:
HandlerConfiguration.setFormatterName(String),ValueExpression
-
setFormatterName
private void setFormatterName(ValueExpression<java.lang.String> expression)
-
getLevel
public java.lang.String getLevel()
Description copied from interface:HandlerConfigurationGets the level set on the handler.- Specified by:
getLevelin interfaceHandlerConfiguration- Returns:
- the level
-
getLevelValueExpression
public ValueExpression<java.lang.String> getLevelValueExpression()
Description copied from interface:HandlerConfigurationReturns the level that may be an expression.- Specified by:
getLevelValueExpressionin interfaceHandlerConfiguration- Returns:
- the level
-
setLevel
public void setLevel(java.lang.String level)
Description copied from interface:HandlerConfigurationSets the level on the handler.- Specified by:
setLevelin interfaceHandlerConfiguration- Parameters:
level- the level to set, may be an expression- See Also:
ValueExpression
-
setLevel
public void setLevel(java.lang.String expression, java.lang.String level)Description copied from interface:HandlerConfigurationSets the expression value for the level. This method will not parse the expression for the value and instead use thelevelparameter for the level on the handler.- Specified by:
setLevelin interfaceHandlerConfiguration- Parameters:
expression- the expression used to resolve the levellevel- the level to use- See Also:
HandlerConfiguration.setLevel(String),ValueExpression
-
setLevelValueExpression
private void setLevelValueExpression(ValueExpression<java.lang.String> expression)
-
getFilter
public java.lang.String getFilter()
- Specified by:
getFilterin interfaceHandlerConfiguration
-
getFilterValueExpression
public ValueExpression<java.lang.String> getFilterValueExpression()
Description copied from interface:HandlerConfigurationReturns a filter that may be an expression.- Specified by:
getFilterValueExpressionin interfaceHandlerConfiguration- Returns:
- the filter
-
setFilter
public void setFilter(java.lang.String filter)
- Specified by:
setFilterin interfaceHandlerConfiguration
-
setFilter
public void setFilter(java.lang.String expression, java.lang.String value)Description copied from interface:HandlerConfigurationSets the expression value and for the filter. This method will not parse the expression for the value and instead use thevalueparameter for the filter on the handler.- Specified by:
setFilterin interfaceHandlerConfiguration- Parameters:
expression- the expressionvalue- the value to set the filter to
-
setFilter
private void setFilter(ValueExpression<java.lang.String> expression)
-
getEncoding
public java.lang.String getEncoding()
- Specified by:
getEncodingin interfaceHandlerConfiguration
-
getEncodingValueExpression
public ValueExpression<java.lang.String> getEncodingValueExpression()
Description copied from interface:HandlerConfigurationReturns the encoding which may be an expression.- Specified by:
getEncodingValueExpressionin interfaceHandlerConfiguration- Returns:
- the encoding
-
setEncoding
public void setEncoding(java.lang.String encoding)
- Specified by:
setEncodingin interfaceHandlerConfiguration
-
setEncoding
public void setEncoding(java.lang.String expression, java.lang.String value)Description copied from interface:HandlerConfigurationSets the expression value for the encoding. This method will not parse the expression for the value and instead use thevalueparameter for the encoding on the handler.- Specified by:
setEncodingin interfaceHandlerConfiguration- Parameters:
expression- the expressionvalue- the value to set the encoding to- See Also:
HandlerConfiguration.setEncoding(String),ValueExpression
-
setEncoding
private void setEncoding(ValueExpression<java.lang.String> expression)
-
getErrorManagerName
public java.lang.String getErrorManagerName()
- Specified by:
getErrorManagerNamein interfaceHandlerConfiguration
-
getErrorManagerNameValueExpression
public ValueExpression<java.lang.String> getErrorManagerNameValueExpression()
Description copied from interface:HandlerConfigurationReturns the error manager name which may be an expression.- Specified by:
getErrorManagerNameValueExpressionin interfaceHandlerConfiguration- Returns:
- the error manager name
-
setErrorManagerName
public void setErrorManagerName(java.lang.String errorManagerName)
- Specified by:
setErrorManagerNamein interfaceHandlerConfiguration
-
setErrorManagerName
public void setErrorManagerName(java.lang.String expression, java.lang.String value)Description copied from interface:HandlerConfigurationSets the expression value for the error manager name. This method will not parse the expression for the value and instead use thevalueparameter for the error manager name on the handler.- Specified by:
setErrorManagerNamein interfaceHandlerConfiguration- Parameters:
expression- the expressionvalue- the value to set the error manager name to- See Also:
HandlerConfiguration.setErrorManagerName(String),ValueExpression
-
setErrorManagerName
private void setErrorManagerName(ValueExpression<java.lang.String> expression)
-
getHandlerNames
public java.util.List<java.lang.String> getHandlerNames()
Description copied from interface:HandlerContainingConfigurableGet the names of the configured handlers.- Specified by:
getHandlerNamesin interfaceHandlerContainingConfigurable- Returns:
- the names of the configured handlers
-
setHandlerNames
public void setHandlerNames(java.lang.String... names)
Description copied from interface:HandlerContainingConfigurableSet the names of the configured handlers.- Specified by:
setHandlerNamesin interfaceHandlerContainingConfigurable- Parameters:
names- the names of the configured handlers
-
setHandlerNames
public void setHandlerNames(java.util.Collection<java.lang.String> names)
Description copied from interface:HandlerContainingConfigurableSet the names of the configured handlers.- Specified by:
setHandlerNamesin interfaceHandlerContainingConfigurable- Parameters:
names- the names of the configured handlers
-
addHandlerName
public boolean addHandlerName(java.lang.String name)
Description copied from interface:HandlerContainingConfigurableAdd a handler name to this logger.- Specified by:
addHandlerNamein interfaceHandlerContainingConfigurable- Parameters:
name- the handler name- Returns:
trueif the name was not already set,falseif it was
-
removeHandlerName
public boolean removeHandlerName(java.lang.String name)
Description copied from interface:HandlerContainingConfigurableRemove a handler name from this logger.- Specified by:
removeHandlerNamein interfaceHandlerContainingConfigurable- Parameters:
name- the handler name- Returns:
trueif the name was removed,falseif it was not present
-
getDescription
java.lang.String getDescription()
- Specified by:
getDescriptionin classAbstractPropertyConfiguration<java.util.logging.Handler,HandlerConfigurationImpl>
-
getConstructAction
ConfigAction<java.util.logging.Handler> getConstructAction()
- Overrides:
getConstructActionin classAbstractPropertyConfiguration<java.util.logging.Handler,HandlerConfigurationImpl>
-
getRemoveAction
ConfigAction<java.lang.Void> getRemoveAction()
- Overrides:
getRemoveActionin classAbstractBasicConfiguration<java.util.logging.Handler,HandlerConfigurationImpl>
-
-