View Javadoc

1   /**
2    * Logback: the generic, reliable, fast and flexible logging framework.
3    * 
4    * Copyright (C) 2000-2008, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  package ch.qos.logback.core.boolex;
11  
12  import ch.qos.logback.core.spi.ContextAwareBase;
13  
14  abstract public class EventEvaluatorBase<E> extends ContextAwareBase implements
15      EventEvaluator<E> {
16  
17    String name;
18    boolean started;
19  
20    public String getName() {
21  
22      return name;
23    }
24  
25    public void setName(String name) {
26      if (this.name != null) {
27        throw new IllegalStateException("name has been already set");
28      }
29      this.name = name;
30    }
31    
32    public boolean isStarted() {
33      return started;
34    }
35  
36    public void start() {
37      started = true;
38  
39    }
40  
41    public void stop() {
42      started = false;
43    }
44  
45  }