1 24 25 package org.objectweb.dream.control.activity.task; 26 27 import org.objectweb.dream.control.logger.Loggable; 28 import org.objectweb.dream.control.logger.LoggerController; 29 import org.objectweb.dream.control.logger.LoggerControllerRegister; 30 import org.objectweb.dream.util.NullLogger; 31 import org.objectweb.fractal.api.factory.InstantiationException; 32 import org.objectweb.fractal.julia.InitializationContext; 33 import org.objectweb.util.monolog.api.Logger; 34 35 46 public abstract class LoggableTaskManagerMixin implements Loggable 47 { 48 49 50 public Logger weaveableTMCLogger; 51 52 55 public void initFcController(final InitializationContext ic) 56 throws InstantiationException 57 { 58 _super_initFcController(ic); 59 weaveableTMCLogger = NullLogger.NULL_LOGGER; 61 if (_this_weaveableOptLogC != null) 63 { 64 ((LoggerControllerRegister) _this_weaveableOptLogC).register( 65 "task-manager", (Loggable) this); 66 } 67 } 68 69 72 public void setLogger(String name, Logger logger) 73 { 74 if ("task".equals(name)) 75 { 76 weaveableTMCLogger = logger; 77 } 78 } 79 80 84 89 public LoggerController _this_weaveableOptLogC; 90 91 98 public abstract void _super_initFcController(InitializationContext ic) 99 throws InstantiationException ; 100 101 } | Popular Tags |