org.apache.karaf.shell.dev
Class AbstractBundleCommand

java.lang.Object
  extended by org.apache.karaf.shell.console.AbstractAction
      extended by org.apache.karaf.shell.console.OsgiCommandSupport
          extended by org.apache.karaf.shell.dev.AbstractBundleCommand
All Implemented Interfaces:
org.apache.felix.gogo.commands.Action, org.apache.karaf.shell.console.BundleContextAware
Direct Known Subclasses:
DynamicImport, ShowBundleTree

public abstract class AbstractBundleCommand
extends org.apache.karaf.shell.console.OsgiCommandSupport

Base class for a dev: command that takes a bundle id as an argument It also provides convient access to the PackageAdmin service


Field Summary
 
Fields inherited from class org.apache.karaf.shell.console.OsgiCommandSupport
bundleContext, usedReferences
 
Fields inherited from class org.apache.karaf.shell.console.AbstractAction
log, session
 
Constructor Summary
AbstractBundleCommand()
           
 
Method Summary
protected  Object doExecute()
           
protected abstract  void doExecute(org.osgi.framework.Bundle bundle)
           
protected  org.osgi.service.packageadmin.PackageAdmin getPackageAdmin()
           
protected  Map<String,org.osgi.framework.Bundle> getWiredBundles(org.osgi.framework.Bundle bundle)
           
 
Methods inherited from class org.apache.karaf.shell.console.OsgiCommandSupport
execute, getAllServices, getBundleContext, getService, setBundleContext, ungetServices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBundleCommand

public AbstractBundleCommand()
Method Detail

doExecute

protected Object doExecute()
                    throws Exception
Specified by:
doExecute in class org.apache.karaf.shell.console.AbstractAction
Throws:
Exception

doExecute

protected abstract void doExecute(org.osgi.framework.Bundle bundle)
                           throws Exception
Throws:
Exception

getWiredBundles

protected Map<String,org.osgi.framework.Bundle> getWiredBundles(org.osgi.framework.Bundle bundle)

getPackageAdmin

protected org.osgi.service.packageadmin.PackageAdmin getPackageAdmin()


Copyright © 2007-2013 FuseSource, Corp.. All Rights Reserved.