1 26 package org.objectweb.openccm.explorer.Components; 27 28 import org.objectweb.util.explorer.api.MenuItem; 29 import org.objectweb.util.explorer.api.MenuItemTreeView; 30 import org.objectweb.util.explorer.api.TreeView; 31 import org.omg.Components.CCMObject; 32 import org.omg.Components.EmitterDescription; 33 34 42 public class DisconnectConsumerAction 43 implements MenuItem 44 { 45 46 49 public int getStatus(TreeView arg0){ 50 return MenuItem.ENABLED_STATUS; 51 } 52 53 56 public void actionPerformed(MenuItemTreeView e) throws Exception { 57 EmitterContainer ec = (EmitterContainer) e.getParentObject(); 58 CCMObject component = ec.getComponent(); 59 EmitterDescription emitter = ec.getEmitter(); 60 component.disconnect_consumer(emitter.name); 61 } 62 63 } 64 | Popular Tags |