Package org.apache.felix.mosgi.console.ifc

Examples of org.apache.felix.mosgi.console.ifc.Plugin


  //   PropertyChangeListener Impl.      //
  /////////////////////////////////////////
  public void propertyChange(PropertyChangeEvent event) {
    //System.out.println("   PCE : "+event.getPropertyName());
    if (event.getPropertyName().equals(Plugin.PLUGIN_ADDED)) {
      Plugin cp=(Plugin) event.getNewValue();
      this.add(cp.getName(), cp.getGUI());
      System.out.println("Add gui \""+cp.getName()+"\" into NodePanel"/*+" :: "+cp.getGUI()*/);     
      this.a.addPropertyChangeListener(cp);
      this.pluginList.put(cp.pluginLocation(), cp);
    }else if(event.getPropertyName().equals(Plugin.PLUGIN_REMOVED)) {
      Plugin cp = (Plugin) event.getNewValue();
      String cpLoc=cp.pluginLocation();
      this.remove(cp.getGUI());
      //this.a.removePropertyChangeListener(cp);
      //this.pluginList.remove(cpLoc);
    }else if(event.getPropertyName().equals(Plugin.EMPTY_NODE)) {
      //System.out.println("******* Debug No node selected");
      this.clean();
View Full Code Here


          if ( "TabUI".equals(name.getDomain()) ) {
            /* Get the plugin implementation via a bundle */
      try {
              String tabBundle = (String) mbsc.getAttribute(name, "BundleName"); // mbe, anfe, be, infe, re
              if (tabBundle!=null){
                Plugin p = (Plugin) this.pluginList.get(tabBundle);
                if (p == null){
                  Bundle b = m_context.installBundle(tabBundle); // be
                  try {
              b.start(); // be2
                    System.out.println(" - Bundle started: \""+name.toString()+"\" - "+tabBundle);
            }catch(BundleException be2) { // be2
                    System.out.println(" - Unable to start: \""+name.toString()+"\" - "+tabBundle);
        be2.printStackTrace();
        v_unstartedBundle.add(name);
            }
                }else {
                  System.out.println(" - Register service plugin: "+p);
                  p.registerServicePlugin();
                }
/*              ServiceReference[] sr = b.getRegisteredServices();
*              System.out.println(sr);
*              Plugin p;
*              for (int j=0 ; j < sr.length ; j++) {
View Full Code Here

    for ( Iterator i=pluginList.keySet().iterator(); i.hasNext();) {
      Object o=i.next();
      pluginList_tmp.add(o);
    }
    for ( int i = 0 ; i < pluginList_tmp.size() ; i++) {
      Plugin p=(Plugin) pluginList.get(pluginList_tmp.elementAt(i));
      try {
        p.unregisterServicePlugin();
      } catch (Exception ex) {
  //System.out.println("\""+p.getName()+"\" : "+ex);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.felix.mosgi.console.ifc.Plugin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.