1 26 27 package org.objectweb.openccm.OpenCCM_DCI.cif; 28 29 import org.objectweb.openccm.OpenCCM_DCI.*; 30 31 39 40 public class ContainerManagerImpl 41 extends org.objectweb.openccm.OpenCCM_DCI. 42 ContainerManagerSessionComposition.ContainerManagerImpl 43 { 44 private org.omg.Components.ConfigValue configuration[]; 51 private org.omg.Components.Cookie cookie; 53 private org.objectweb.openccm 55 .OpenCCM_DCI.ContainerManagerRegistration ContMR; 56 57 private boolean removed; 60 61 74 public void 75 configuration_complete() 76 { 77 ContMR=get_context().get_connection_container_manager_registration(); 79 80 try{ 81 org.omg.Components.SessionContext sc= 82 (org.omg.Components.SessionContext)get_context(); 83 84 ((ContainerSegImpl)obtain_executor("container")) 85 .configuration(configuration); 86 cookie=ContMR 88 .register_container_manager( 89 org.objectweb.openccm. 90 OpenCCM_DCI.ContainerManagerHelper 91 .narrow(sc.get_CCM_object())); 92 ((ContainerSegImpl)obtain_executor("container")).cookie(cookie); 94 } 95 catch(Exception e) 96 { 97 e.printStackTrace(); 98 } 99 } 100 101 102 public 103 void 104 ccm_remove() 105 throws org.omg.Components.CCMException 106 { 107 if(!removed){ 108 removed=true; 109 try 110 { 111 ((ContainerSegImpl)obtain_executor("container")).remove(); 113 } 114 catch(Exception e ) 115 { 116 System.out.println("Cannot disconnect ComponentServer/Container"); 117 e.printStackTrace(); 118 } 119 120 } 121 122 } 123 129 public 130 org.omg.Components.ConfigValue [] 131 config() 132 { 133 return configuration; 134 } 135 136 public 137 void 138 config(org.omg.Components.ConfigValue configuration[]){ 139 this.configuration=configuration; 140 } 141 142 } 143 | Popular Tags |