KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > perseus > fos > api > FosLoggerFactory


1 /**
2  * Copyright (C) 2000
3  */

4
5 package org.objectweb.perseus.fos.api;
6
7 import org.objectweb.util.monolog.api.Logger;
8 import org.objectweb.util.monolog.api.MonologFactory;
9
10 /**
11  * Defines the way to retrieve the logger associated to the different kinds of
12  * FOS entities that are traced.
13  * @author S. Chassande-Barrioz, P. D�chamboux
14  */

15 public interface FosLoggerFactory {
16     /**
17      * For removing all DEBUG traces from the FOS adapter code,
18      * set it to false!!
19      */

20     final static boolean DEBUG = true;
21     /**
22      * For Connection entities associated to the FOS.
23      */

24     final static byte CONNECTION = 1;
25     /**
26      * For ManagedConnection entities associated to the FOS.
27      */

28     final static byte MANAGEDCONNECTION = 2;
29     /**
30      * For XAResource entities associated to the FOS.
31      */

32     final static byte XARESOURCE = 4;
33     /**
34      * For TxContext entities associated to the FOS.
35      */

36     final static byte TXCONTEXT = 8;
37
38     /**
39      * Gives access to the logger associated to a given kind of entities managed
40      * by this FOS adapter, which are further classified into factories or
41      * non-factories.
42      * @param entity The kind of entity (see CONNECTION, MANAGEDCONNECTION,
43      * XARESOURCE and TXCONTEXT constants defined above).
44      * @param factory Specifies if the concerned entity is a factory.
45      * @return The relevant logger.
46      */

47     Logger getLogger(byte entity, boolean factory);
48
49     void setMonologFactory(MonologFactory mf);
50 }
Popular Tags