Logback API
Version 0.9.8

ch.qos.logback.access.spi
Class BasicContext

java.lang.Object
  extended by ch.qos.logback.core.ContextBase
      extended by ch.qos.logback.access.spi.BasicContext
All Implemented Interfaces:
Context, AppenderAttachable<AccessEvent>, FilterAttachable

public class BasicContext
extends ContextBase
implements AppenderAttachable<AccessEvent>, FilterAttachable

This class is a context that can be used by access to provide the basic functionnalities of a context to its components, mainly SocketServer.

Author:
Sébastien Pennec

Constructor Summary
BasicContext()
           
 
Method Summary
 void addAppender(Appender<AccessEvent> newAppender)
          Add an appender.
 void addFilter(Filter newFilter)
          Add a filter.
 void callAppenders(AccessEvent event)
           
 void clearAllFilters()
           
 void detachAndStopAllAppenders()
          Detach all previously added appenders.
 boolean detachAppender(Appender appender)
          Detach the appender passed as parameter from the list of appenders.
 Appender<AccessEvent> detachAppender(String name)
          Detach the appender with the name passed as parameter from the list of appenders.
 Appender<AccessEvent> getAppender(String name)
          Get an appender by name.
 FilterReply getFilterChainDecision(Object event)
          Loop through the filters in the chain.
 Filter getFirstFilter()
          Get first filter in the chain.
 boolean isAttached(Appender appender)
          Returns true if the specified appender is in list of attached attached, false otherwise.
 Iterator iteratorForAppenders()
          Get an iterator for appenders contained in the parent object.
 
Methods inherited from class ch.qos.logback.core.ContextBase
getName, getObject, getProperty, getPropertyMap, getStatusManager, putObject, setName, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicContext

public BasicContext()
Method Detail

callAppenders

public void callAppenders(AccessEvent event)

addAppender

public void addAppender(Appender<AccessEvent> newAppender)
Description copied from interface: AppenderAttachable
Add an appender.

Specified by:
addAppender in interface AppenderAttachable<AccessEvent>

detachAndStopAllAppenders

public void detachAndStopAllAppenders()
Description copied from interface: AppenderAttachable
Detach all previously added appenders.

Specified by:
detachAndStopAllAppenders in interface AppenderAttachable<AccessEvent>

detachAppender

public boolean detachAppender(Appender appender)
Description copied from interface: AppenderAttachable
Detach the appender passed as parameter from the list of appenders.

Specified by:
detachAppender in interface AppenderAttachable<AccessEvent>

detachAppender

public Appender<AccessEvent> detachAppender(String name)
Description copied from interface: AppenderAttachable
Detach the appender with the name passed as parameter from the list of appenders.

Specified by:
detachAppender in interface AppenderAttachable<AccessEvent>

getAppender

public Appender<AccessEvent> getAppender(String name)
Description copied from interface: AppenderAttachable
Get an appender by name.

Specified by:
getAppender in interface AppenderAttachable<AccessEvent>

isAttached

public boolean isAttached(Appender appender)
Description copied from interface: AppenderAttachable
Returns true if the specified appender is in list of attached attached, false otherwise.

Specified by:
isAttached in interface AppenderAttachable<AccessEvent>

iteratorForAppenders

public Iterator iteratorForAppenders()
Description copied from interface: AppenderAttachable
Get an iterator for appenders contained in the parent object.

Specified by:
iteratorForAppenders in interface AppenderAttachable<AccessEvent>

addFilter

public void addFilter(Filter newFilter)
Description copied from interface: FilterAttachable
Add a filter.

Specified by:
addFilter in interface FilterAttachable

clearAllFilters

public void clearAllFilters()
Specified by:
clearAllFilters in interface FilterAttachable

getFilterChainDecision

public FilterReply getFilterChainDecision(Object event)
Description copied from interface: FilterAttachable
Loop 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:
getFilterChainDecision in interface FilterAttachable

getFirstFilter

public Filter getFirstFilter()
Description copied from interface: FilterAttachable
Get first filter in the chain.

Specified by:
getFirstFilter in interface FilterAttachable

Logback API
Version 0.9.8

Copyright © 2005-2008 QOS.ch. All Rights Reserved.