- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.model.processor.ModelHandlerBase
-
- All Implemented Interfaces:
ContextAware
- Direct Known Subclasses:
AppenderDeclarationAnalyser,AppenderModelHandler,AppenderRefDependencyAnalyser,AppenderRefModelHandler,ByPropertiesConditionModelHandler,ConfigurationModelHandler,ContextNameModelHandler,ConversionRuleModelHandler,DefineModelHandler,ElseModelHandler,EventEvaluatorModelHandler,FileCollisionAnalyser,IfModelHandler,ImplicitModelHandler,ImportModelHandler,InsertFromJNDIModelHandler,LevelModelHandler,LoggerContextListenerModelHandler,LoggerModelHandler,NOPModelHandler,NOPSiftModelHandler,ParamModelHandler,PropertyModelHandler,RefContainerDependencyAnalyser,ResourceHandlerBase,RootLoggerModelHandler,SequenceNumberGeneratorModelHandler,SerializeModelModelHandler,ShutdownHookModelHandler,SiftModelHandler,StatusListenerModelHandler,ThenModelHandler,TimestampModelHandler
public abstract class ModelHandlerBase extends ContextAwareBase
-
-
Field Summary
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description ModelHandlerBase(Context context)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Class<? extends Model>getSupportedModelClass()Subclasses should return the subclass of Model that they expect to handle.abstract voidhandle(ModelInterpretationContext mic, Model model)protected booleanisSupportedModelType(Model model)voidpostHandle(ModelInterpretationContext mic, Model model)StringtoString()-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
-
-
-
Constructor Detail
-
ModelHandlerBase
public ModelHandlerBase(Context context)
-
-
Method Detail
-
getSupportedModelClass
protected Class<? extends Model> getSupportedModelClass()
Subclasses 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.- Returns:
- supported model class
- See Also:
isSupportedModelType(Model)
-
isSupportedModelType
protected boolean isSupportedModelType(Model model)
-
handle
public abstract void handle(ModelInterpretationContext mic, Model model) throws ModelHandlerException
- Throws:
ModelHandlerException
-
postHandle
public void postHandle(ModelInterpretationContext mic, Model model) throws ModelHandlerException
- Throws:
ModelHandlerException
-
-