1 26 27 package org.objectweb.openccm.OpenCCM_DCI.cif; 28 29 import org.objectweb.openccm.OpenCCM_DCI.*; 30 39 public class NodeManagementSegImpl 40 extends org.objectweb.openccm 41 .OpenCCM_DCI.DCIManagerSessionComposition 42 .NodeManagementSeg 43 { 44 private java.util.Hashtable nodes; 51 private org.objectweb.openccm.OpenCCM_DCI.DCIManagerCCM DCI; 53 54 public NodeManagementSegImpl(){ 65 super(); 66 nodes=new java.util.Hashtable (); 67 } 68 69 77 public void setupDCI(){ 78 DCI=(org.objectweb.openccm.OpenCCM_DCI.DCIManagerCCM) 79 get_context(); 80 } 81 82 92 public void 93 register_node( 94 String node_name, 95 org.ist.coach.DCI.NodeManager node_manager) 96 { 97 try{ 98 nodes.put(node_name, 99 ((org.objectweb.openccm.OpenCCM_DCI.DCIManagerCCM) 100 get_context()) 101 .connect_node_managers(node_manager) ); 102 } 103 catch(Exception e){ 104 e.printStackTrace(); 105 } 106 } 107 108 116 public void 117 deregister_node( String node_name) 118 throws org.ist.coach.DCI.UnknownNode 119 { 120 try{ 121 122 ((org.objectweb.openccm.OpenCCM_DCI.DCIManagerCCM) 123 get_context()) 124 .disconnect_node_managers((org.omg.Components.Cookie) 125 nodes.get(node_name)); 126 } 127 catch(Exception e){ 128 e.printStackTrace(); 129 throw new org.ist.coach.DCI.UnknownNode(); 130 } 131 } 132 133 } 134 | Popular Tags |