1 28 29 package org.objectweb.fractal.explorer.context; 30 31 import org.objectweb.fractal.api.NoSuchInterfaceException; 32 import org.objectweb.fractal.api.control.LifeCycleController; 33 import org.objectweb.fractal.explorer.FcExplorer; 34 import org.objectweb.fractal.explorer.api.FractalContext; 35 import org.objectweb.util.explorer.api.Context; 36 import org.objectweb.util.explorer.api.Entry; 37 38 43 public abstract class DefaultFractalContext 44 implements Context, 45 FractalContext 46 { 47 48 54 protected Object object_ = null; 55 56 62 68 74 78 public Entry[] getEntries(Object object) { 79 object_ = object; 80 LifeCycleController lcc = null; 81 try { 82 lcc = FcExplorer.getLifeCycleController(FcExplorer.getComponent(object)); 83 } catch (NoSuchInterfaceException e2) { 84 try { 85 return getStartedEntries(); 86 } catch (Exception e1) { 87 return getStoppedEntries(); 88 } 89 } 90 if (lcc.getFcState().equals(LifeCycleController.STARTED)) 91 return getStartedEntries(); 92 else 93 return getStoppedEntries(); 94 } 95 96 102 106 public abstract Entry[] getStartedEntries() ; 107 108 112 public Entry[] getStoppedEntries() { 113 return new Entry[0]; 114 } 115 116 } | Popular Tags |