1 26 27 package org.objectweb.openccm.OpenCCM_DCI.cif; 28 29 import org.objectweb.openccm.OpenCCM_DCI.*; 30 31 40 41 public class ComponentServerManagerImpl 42 extends org.objectweb.openccm.OpenCCM_DCI 43 .ComponentServerManagerSessionComposition 44 .ComponentServerManagerImpl 45 { 46 47 private org.omg.Components.ConfigValue configuration[]; 54 private org.omg.Components.Cookie cookie; 56 private org.objectweb.openccm.OpenCCM_DCI 58 .ComponentServerManagerRegistration CSMR; 59 private boolean removed=false; 62 63 69 75 public void 76 configuration_complete() 77 { 78 CSMR=get_context() 80 .get_connection_component_server_manager_registration(); 81 82 try{ 83 org.omg.Components.SessionContext sc= 84 (org.omg.Components.SessionContext)get_context(); 85 86 ((ComponentServerSegImpl)obtain_executor("component_server")) 87 .configuration(configuration); 88 89 cookie= CSMR.register_component_server_manager 90 (org.objectweb.openccm. 91 OpenCCM_DCI.ComponentServerManagerHelper 92 .narrow(sc.get_CCM_object())); 93 94 ((ComponentServerSegImpl) 95 obtain_executor("component_server")).cookie(cookie); 96 97 98 } 99 catch(Exception e) 100 { 101 e.printStackTrace(); 102 } 103 } 104 105 106 public void 107 ccm_remove() 108 throws org.omg.Components.CCMException 109 { 110 if(!removed){ 111 removed=true; 112 try{ 113 ((ComponentServerSegImpl) 115 obtain_executor("component_server")).remove(); 116 } 117 catch(Exception e ) 118 { 119 System.out.println("Deconnection ComponentServer/Node impossible"); 120 e.printStackTrace(); 121 } 122 } 123 } 124 125 126 127 public 133 org.omg.Components.ConfigValue [] 134 config() 135 { 136 return configuration; 137 } 138 139 public 140 void 141 config(org.omg.Components.ConfigValue configuration[]){ 142 this.configuration=configuration; 143 } 144 145 } 146 | Popular Tags |