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>
encoding
private ValueExpression<java.lang.String>
errorManagerName
private ValueExpression<java.lang.String>
filter
private ValueExpression<java.lang.String>
formatterName
private java.util.List<java.lang.String>
handlerNames
private 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 boolean
addHandlerName(java.lang.String name)
Add a handler name to this logger.(package private) ConfigAction<java.util.logging.Handler>
getConstructAction()
(package private) java.lang.String
getDescription()
java.lang.String
getEncoding()
ValueExpression<java.lang.String>
getEncodingValueExpression()
Returns the encoding which may be an expression.java.lang.String
getErrorManagerName()
ValueExpression<java.lang.String>
getErrorManagerNameValueExpression()
Returns the error manager name which may be an expression.java.lang.String
getFilter()
ValueExpression<java.lang.String>
getFilterValueExpression()
Returns a filter that may be an expression.java.lang.String
getFormatterName()
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.String
getLevel()
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()
boolean
removeHandlerName(java.lang.String name)
Remove a handler name from this logger.void
setEncoding(java.lang.String encoding)
void
setEncoding(java.lang.String expression, java.lang.String value)
Sets the expression value for the encoding.private void
setEncoding(ValueExpression<java.lang.String> expression)
void
setErrorManagerName(java.lang.String errorManagerName)
void
setErrorManagerName(java.lang.String expression, java.lang.String value)
Sets the expression value for the error manager name.private void
setErrorManagerName(ValueExpression<java.lang.String> expression)
void
setFilter(java.lang.String filter)
void
setFilter(java.lang.String expression, java.lang.String value)
Sets the expression value and for the filter.private void
setFilter(ValueExpression<java.lang.String> expression)
void
setFormatterName(java.lang.String formatterName)
Set the name of the configured formatter for this handler.void
setFormatterName(java.lang.String expression, java.lang.String value)
Sets the expression value for the formatter name.private void
setFormatterName(ValueExpression<java.lang.String> expression)
void
setHandlerNames(java.lang.String... names)
Set the names of the configured handlers.void
setHandlerNames(java.util.Collection<java.lang.String> names)
Set the names of the configured handlers.void
setLevel(java.lang.String level)
Sets the level on the handler.void
setLevel(java.lang.String expression, java.lang.String level)
Sets the expression value for the level.private void
setLevelValueExpression(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:HandlerConfiguration
Get the name of the configured formatter for this handler.- Specified by:
getFormatterName
in interfaceHandlerConfiguration
- Returns:
- the formatter name
-
getFormatterNameValueExpression
public ValueExpression<java.lang.String> getFormatterNameValueExpression()
Description copied from interface:HandlerConfiguration
Gets the formatter name which may be an expression.- Specified by:
getFormatterNameValueExpression
in interfaceHandlerConfiguration
- Returns:
- the formatter name
-
setFormatterName
public void setFormatterName(java.lang.String formatterName)
Description copied from interface:HandlerConfiguration
Set the name of the configured formatter for this handler.- Specified by:
setFormatterName
in interfaceHandlerConfiguration
- Parameters:
formatterName
- the formatter name
-
setFormatterName
public void setFormatterName(java.lang.String expression, java.lang.String value)
Description copied from interface:HandlerConfiguration
Sets the expression value for the formatter name. This method will not parse the expression for the value and instead use thelevel
parameter for the formatter name on the handler.- Specified by:
setFormatterName
in 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:HandlerConfiguration
Gets the level set on the handler.- Specified by:
getLevel
in interfaceHandlerConfiguration
- Returns:
- the level
-
getLevelValueExpression
public ValueExpression<java.lang.String> getLevelValueExpression()
Description copied from interface:HandlerConfiguration
Returns the level that may be an expression.- Specified by:
getLevelValueExpression
in interfaceHandlerConfiguration
- Returns:
- the level
-
setLevel
public void setLevel(java.lang.String level)
Description copied from interface:HandlerConfiguration
Sets the level on the handler.- Specified by:
setLevel
in 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:HandlerConfiguration
Sets the expression value for the level. This method will not parse the expression for the value and instead use thelevel
parameter for the level on the handler.- Specified by:
setLevel
in 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:
getFilter
in interfaceHandlerConfiguration
-
getFilterValueExpression
public ValueExpression<java.lang.String> getFilterValueExpression()
Description copied from interface:HandlerConfiguration
Returns a filter that may be an expression.- Specified by:
getFilterValueExpression
in interfaceHandlerConfiguration
- Returns:
- the filter
-
setFilter
public void setFilter(java.lang.String filter)
- Specified by:
setFilter
in interfaceHandlerConfiguration
-
setFilter
public void setFilter(java.lang.String expression, java.lang.String value)
Description copied from interface:HandlerConfiguration
Sets the expression value and for the filter. This method will not parse the expression for the value and instead use thevalue
parameter for the filter on the handler.- Specified by:
setFilter
in 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:
getEncoding
in interfaceHandlerConfiguration
-
getEncodingValueExpression
public ValueExpression<java.lang.String> getEncodingValueExpression()
Description copied from interface:HandlerConfiguration
Returns the encoding which may be an expression.- Specified by:
getEncodingValueExpression
in interfaceHandlerConfiguration
- Returns:
- the encoding
-
setEncoding
public void setEncoding(java.lang.String encoding)
- Specified by:
setEncoding
in interfaceHandlerConfiguration
-
setEncoding
public void setEncoding(java.lang.String expression, java.lang.String value)
Description copied from interface:HandlerConfiguration
Sets the expression value for the encoding. This method will not parse the expression for the value and instead use thevalue
parameter for the encoding on the handler.- Specified by:
setEncoding
in 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:
getErrorManagerName
in interfaceHandlerConfiguration
-
getErrorManagerNameValueExpression
public ValueExpression<java.lang.String> getErrorManagerNameValueExpression()
Description copied from interface:HandlerConfiguration
Returns the error manager name which may be an expression.- Specified by:
getErrorManagerNameValueExpression
in interfaceHandlerConfiguration
- Returns:
- the error manager name
-
setErrorManagerName
public void setErrorManagerName(java.lang.String errorManagerName)
- Specified by:
setErrorManagerName
in interfaceHandlerConfiguration
-
setErrorManagerName
public void setErrorManagerName(java.lang.String expression, java.lang.String value)
Description copied from interface:HandlerConfiguration
Sets the expression value for the error manager name. This method will not parse the expression for the value and instead use thevalue
parameter for the error manager name on the handler.- Specified by:
setErrorManagerName
in 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:HandlerContainingConfigurable
Get the names of the configured handlers.- Specified by:
getHandlerNames
in interfaceHandlerContainingConfigurable
- Returns:
- the names of the configured handlers
-
setHandlerNames
public void setHandlerNames(java.lang.String... names)
Description copied from interface:HandlerContainingConfigurable
Set the names of the configured handlers.- Specified by:
setHandlerNames
in interfaceHandlerContainingConfigurable
- Parameters:
names
- the names of the configured handlers
-
setHandlerNames
public void setHandlerNames(java.util.Collection<java.lang.String> names)
Description copied from interface:HandlerContainingConfigurable
Set the names of the configured handlers.- Specified by:
setHandlerNames
in interfaceHandlerContainingConfigurable
- Parameters:
names
- the names of the configured handlers
-
addHandlerName
public boolean addHandlerName(java.lang.String name)
Description copied from interface:HandlerContainingConfigurable
Add a handler name to this logger.- Specified by:
addHandlerName
in interfaceHandlerContainingConfigurable
- Parameters:
name
- the handler name- Returns:
true
if the name was not already set,false
if it was
-
removeHandlerName
public boolean removeHandlerName(java.lang.String name)
Description copied from interface:HandlerContainingConfigurable
Remove a handler name from this logger.- Specified by:
removeHandlerName
in interfaceHandlerContainingConfigurable
- Parameters:
name
- the handler name- Returns:
true
if the name was removed,false
if it was not present
-
getDescription
java.lang.String getDescription()
- Specified by:
getDescription
in classAbstractPropertyConfiguration<java.util.logging.Handler,HandlerConfigurationImpl>
-
getConstructAction
ConfigAction<java.util.logging.Handler> getConstructAction()
- Overrides:
getConstructAction
in classAbstractPropertyConfiguration<java.util.logging.Handler,HandlerConfigurationImpl>
-
getRemoveAction
ConfigAction<java.lang.Void> getRemoveAction()
- Overrides:
getRemoveAction
in classAbstractBasicConfiguration<java.util.logging.Handler,HandlerConfigurationImpl>
-
-