KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > monolog > api > HandlerFactory


1 /**
2  * Copyright (C) 2001-2003 France Telecom R&D
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19 package org.objectweb.util.monolog.api;
20
21 /**
22  * It permits to manage Handler instances.
23  *
24  * @author Sebastien Chassande-Barrioz
25  */

26 public interface HandlerFactory {
27
28     /**
29      * It retrieves a new instance of an handler which the type is specified
30      * by the parameter.
31      * @param handlertype is the type of the parameter. The possible value are
32      * defined in this interface by the XXX_HANDLER_TYPE constants.
33      * @return a new instance of an handler
34      */

35     Handler createHandler(String JavaDoc hn, String JavaDoc handlertype);
36
37     /**
38      * It retrieves all handler managed by this factory.
39      * @return a set of Handler instance or an empty set.
40      */

41     Handler[] getHandlers();
42
43     /**
44      * It retrieves the handler which the name is specified by the parameter
45      * @param handlername is the name of the handler
46      * @return an handler instance or a null value.
47      */

48     Handler getHandler(String JavaDoc handlername);
49
50     /**
51      * It removes the handler which the name is specified by the parameter
52      * @param handlername is the name of the handler
53      * @return the removed handler instance or a null value if it does not
54      * exist.
55      */

56     Handler removeHandler(String JavaDoc handlername);
57 }
58
Popular Tags