Package ch.qos.logback.access.spi
Class AccessContext
java.lang.Object
ch.qos.logback.core.ContextBase
ch.qos.logback.access.spi.AccessContext
- All Implemented Interfaces:
Context,AppenderAttachable<IAccessEvent>,FilterAttachable<IAccessEvent>,LifeCycle,PropertyContainer
public class AccessContext
extends ContextBase
implements AppenderAttachable<IAccessEvent>, FilterAttachable<IAccessEvent>
A minimal context implementation used by certain logback-access components,
mainly SocketServer.
- Author:
- Sébastien Pennec
-
Field Summary
Fields inherited from class ch.qos.logback.core.ContextBase
scheduledFutures -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAppender(Appender<IAccessEvent> newAppender) Add an appender.voidaddFilter(Filter<IAccessEvent> newFilter) Add a filter.voidcallAppenders(IAccessEvent event) voidvoidDetach and processPriorToRemoval all previously added appenders.booleandetachAppender(Appender<IAccessEvent> appender) Detach the appender passed as parameter from the list of appenders.booleandetachAppender(String name) Detach the appender with the name passed as parameter from the list of appenders.getAppender(String name) Get an appender by name.Get a copy of all the filters contained within this FilterAttachable object.Loop through the filters in the chain.booleanisAttached(Appender<IAccessEvent> appender) Returnstrueif the specified appender is in list of attached,falseotherwise.Get an iterator for appenders contained in the parent object.Methods inherited from class ch.qos.logback.core.ContextBase
addScheduledFuture, getBirthTime, getConfigurationLock, getCopyOfPropertyMap, getCopyOfScheduledFutures, getExecutorService, getName, getObject, getProperty, getScheduledExecutorService, getScheduledFutures, getSequenceNumberGenerator, getStatusManager, initCollisionMaps, isStarted, putObject, putProperty, register, removeObject, reset, setName, setSequenceNumberGenerator, setStatusManager, start, stop, toString
-
Constructor Details
-
AccessContext
public AccessContext()
-
-
Method Details
-
callAppenders
-
addAppender
Description copied from interface:AppenderAttachableAdd an appender.- Specified by:
addAppenderin interfaceAppenderAttachable<IAccessEvent>
-
detachAndStopAllAppenders
Description copied from interface:AppenderAttachableDetach and processPriorToRemoval all previously added appenders.- Specified by:
detachAndStopAllAppendersin interfaceAppenderAttachable<IAccessEvent>
-
detachAppender
Description copied from interface:AppenderAttachableDetach the appender passed as parameter from the list of appenders.- Specified by:
detachAppenderin interfaceAppenderAttachable<IAccessEvent>
-
detachAppender
Description copied from interface:AppenderAttachableDetach the appender with the name passed as parameter from the list of appenders.- Specified by:
detachAppenderin interfaceAppenderAttachable<IAccessEvent>
-
getAppender
Description copied from interface:AppenderAttachableGet an appender by name.- Specified by:
getAppenderin interfaceAppenderAttachable<IAccessEvent>
-
isAttached
Description copied from interface:AppenderAttachableReturnstrueif the specified appender is in list of attached,falseotherwise.- Specified by:
isAttachedin interfaceAppenderAttachable<IAccessEvent>
-
iteratorForAppenders
Description copied from interface:AppenderAttachableGet an iterator for appenders contained in the parent object.- Specified by:
iteratorForAppendersin interfaceAppenderAttachable<IAccessEvent>
-
addFilter
Description copied from interface:FilterAttachableAdd a filter.- Specified by:
addFilterin interfaceFilterAttachable<IAccessEvent>
-
clearAllFilters
- Specified by:
clearAllFiltersin interfaceFilterAttachable<IAccessEvent>
-
getCopyOfAttachedFiltersList
Description copied from interface:FilterAttachableGet a copy of all the filters contained within this FilterAttachable object.- Specified by:
getCopyOfAttachedFiltersListin interfaceFilterAttachable<IAccessEvent>- Returns:
- all attached filters as a list
-
getFilterChainDecision
Description copied from interface:FilterAttachableLoop through the filters in the chain. As soon as a filter decides on ACCEPT or DENY, then that value is returned. If all of the filters return NEUTRAL, then NEUTRAL is returned.- Specified by:
getFilterChainDecisionin interfaceFilterAttachable<IAccessEvent>
-