- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.model.processor.ModelHandlerBase
-
- ch.qos.logback.core.model.processor.DefineModelHandler
-
- All Implemented Interfaces:
ContextAware
public class DefineModelHandler extends ModelHandlerBase
Instantiate class for define property value. Get future property name and property definer class from attributes. Some property definer properties could be used. After defining put new property to context.- Author:
- Aleksey Didik
-
-
Field Summary
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description DefineModelHandler(Context context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class<DefineModel>getSupportedModelClass()Subclasses should return the subclass of Model that they expect to handle.voidhandle(ModelInterpretationContext interpretationContext, Model model)static DefineModelHandlermakeInstance(Context context, ModelInterpretationContext ic)voidpostHandle(ModelInterpretationContext interpretationContext, Model model)Now property definer is initialized by all properties and we can put property value to context-
Methods inherited from class ch.qos.logback.core.model.processor.ModelHandlerBase
isSupportedModelType, toString
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
-
-
-
Constructor Detail
-
DefineModelHandler
public DefineModelHandler(Context context)
-
-
Method Detail
-
makeInstance
public static DefineModelHandler makeInstance(Context context, ModelInterpretationContext ic)
-
getSupportedModelClass
protected Class<DefineModel> getSupportedModelClass()
Description copied from class:ModelHandlerBaseSubclasses should return the subclass of Model that they expect to handle. The default implementation assumes that all Model classes are supported. This a very lax assumption which is usually not true.- Overrides:
getSupportedModelClassin classModelHandlerBase- Returns:
- supported model class
- See Also:
ModelHandlerBase.isSupportedModelType(Model)
-
handle
public void handle(ModelInterpretationContext interpretationContext, Model model) throws ModelHandlerException
- Specified by:
handlein classModelHandlerBase- Throws:
ModelHandlerException
-
postHandle
public void postHandle(ModelInterpretationContext interpretationContext, Model model) throws ModelHandlerException
Now property definer is initialized by all properties and we can put property value to context- Overrides:
postHandlein classModelHandlerBase- Throws:
ModelHandlerException
-
-