KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > log4j > spi > AppenderAttachable


1 /*
2  * Copyright 1999-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.log4j.spi;
18
19 import org.apache.log4j.Appender;
20 import java.util.Enumeration JavaDoc;
21
22 /**
23    Interface for attaching appenders to objects.
24
25    @author Ceki Gülcü
26    @since 0.9.1 */

27 public interface AppenderAttachable {
28   
29   /**
30      Add an appender.
31    */

32   public
33   void addAppender(Appender newAppender);
34
35   /**
36      Get all previously added appenders as an Enumeration. */

37   public
38   Enumeration JavaDoc getAllAppenders();
39
40   /**
41      Get an appender by name.
42    */

43   public
44   Appender getAppender(String JavaDoc name);
45
46   
47   /**
48      Returns <code>true</code> if the specified appender is in list of
49      attached attached, <code>false</code> otherwise.
50
51      @since 1.2 */

52   public
53   boolean isAttached(Appender appender);
54
55   /**
56      Remove all previously added appenders.
57   */

58   void removeAllAppenders();
59
60
61   /**
62      Remove the appender passed as parameter from the list of appenders.
63   */

64    void removeAppender(Appender appender);
65
66
67  /**
68     Remove the appender with the name passed as parameter from the
69     list of appenders.
70   */

71  void
72  removeAppender(String JavaDoc name);
73 }
74
75
Popular Tags