1 26 27 package org.objectweb.openccm.Containers.Plugins; 28 29 36 37 public class TraceControllerHome 38 extends org.omg.CORBA.LocalObject 39 implements org.objectweb.openccm.Containers.SystemHome 40 { 41 47 50 protected org.objectweb.ccm.util.Table singletons_; 51 52 58 62 protected 63 TraceControllerHome() 64 { 65 singletons_ = new org.objectweb.ccm.util.Table(); 66 } 67 68 74 80 86 public org.objectweb.openccm.Containers.SystemComponent 87 create_component(org.objectweb.openccm.Containers.PropertySet config) 88 throws org.objectweb.openccm.Containers.CreationFailed 89 { 90 boolean is_singleton = true; 91 java.lang.String name = null; 92 try 93 { 94 name = config.get_as_string("singleton").value(); 95 } 96 catch(org.objectweb.openccm.Containers.UnknownProperty ex) 97 { 98 java.lang.String msg = 99 "exception in class org.objectweb.openccm.Containers.Plugins.TraceControllerHome\n"+ 100 " operation : configure\n"+ 101 " message : "+ex.getMessage(); 102 is_singleton = false; 104 } 105 catch(org.objectweb.openccm.Containers.BadPropertyKind ex) 106 { 107 java.lang.String msg = 108 "exception in class org.objectweb.openccm.Containers.Plugins.TraceControllerHome\n"+ 109 " operation : configure\n"+ 110 " message : "+ex.getMessage(); 111 is_singleton = false; 113 } 114 115 if (!is_singleton) 116 return new TraceController(); 117 118 TraceController trace = (TraceController)singletons_.get(name); 119 if (trace!=null) 120 return trace; 121 122 trace = new TraceController(); 123 singletons_.put(name, trace); 124 return trace; 125 } 126 127 133 139 145 public void 146 configure(org.objectweb.openccm.Containers.PropertySet config) 147 throws org.objectweb.openccm.Containers.ConfigurationFailed 148 { 149 } 150 151 157 160 public static TraceControllerHome 161 create() 162 { 163 return new TraceControllerHome(); 164 } 165 166 } 172 | Popular Tags |