KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > dream > control > logger > UseLoggerControllerMixin


1 /**
2  * Dream
3  * Copyright (C) 2003-2004 INRIA Rhone-Alpes
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: dream@objectweb.org
20  *
21  * Initial developer(s): Matthieu Leclercq
22  * Contributor(s):
23  */

24
25 package org.objectweb.dream.control.logger;
26
27 import org.objectweb.fractal.api.factory.InstantiationException;
28 import org.objectweb.fractal.julia.InitializationContext;
29
30 /**
31  * Provides an optional {@link LoggerController }field to a
32  * {@link org.objectweb.fractal.julia.Controller}.
33  */

34 public abstract class UseLoggerControllerMixin
35 {
36
37   // -------------------------------------------------------------------------
38
// Private constructor
39
// -------------------------------------------------------------------------
40

41   private UseLoggerControllerMixin()
42   {
43   }
44
45   // -------------------------------------------------------------------------
46
// Fields and methods added and overriden by the mixin class
47
// -------------------------------------------------------------------------
48

49   /**
50    * The {@link LoggerController}interface of the component to which this
51    * controller object belongs.
52    */

53   public LoggerController weaveableOptLogC;
54
55   /**
56    * Initializes the fields of this mixin and then calls the overriden method.
57    *
58    * @see org.objectweb.fractal.julia.Controller#initFcController(InitializationContext)
59    */

60   public void initFcController(final InitializationContext ic)
61       throws InstantiationException JavaDoc
62   {
63     try
64     {
65       weaveableOptLogC = (LoggerController) ic
66           .getInterface("logger-controller");
67     }
68     catch (InstantiationException JavaDoc e)
69     {
70       weaveableOptLogC = null;
71     }
72     _super_initFcController(ic);
73   }
74
75   // -------------------------------------------------------------------------
76
// Fields and methods required by the mixin class in the base class
77
// -------------------------------------------------------------------------
78

79   /**
80    * The
81    * {@link org.objectweb.fractal.julia.Controller#initFcController(InitializationContext)}
82    * method overriden by this mixin.
83    *
84    * @see org.objectweb.fractal.julia.Controller#initFcController(InitializationContext)
85    */

86   public abstract void _super_initFcController(InitializationContext i)
87       throws InstantiationException JavaDoc;
88
89 }
Popular Tags