org.apache.karaf.shell.console
Class OsgiCommandSupport
java.lang.Object
org.apache.karaf.shell.console.AbstractAction
org.apache.karaf.shell.console.OsgiCommandSupport
- All Implemented Interfaces:
- Action, BundleContextAware
- Direct Known Subclasses:
- AbstractBundleCommand, AdminCommandSupport, BundleCommand, BundlesCommand, BundlesCommandOptional, ClearLog, ConfigCommandSupport, DisplayException, DisplayLog, DumpCommand, FeaturesCommandSupport, FrameworkOptions, GetLogLevel, Headers, Info, InfoAction, InstallBundle, InstallCommand, JaasCommandSupport, ListBundles, ListServices, ObrCommandSupport, PackageCommandSupport, PrintStackTraces, Restart, SetLogLevel, Shutdown, SshAction, SshServerAction, StartLevel, Watch, WebListCommand
public abstract class OsgiCommandSupport
- extends AbstractAction
- implements Action, BundleContextAware
Field Summary |
protected org.osgi.framework.BundleContext |
bundleContext
|
protected java.util.List<org.osgi.framework.ServiceReference> |
usedReferences
|
Method Summary |
java.lang.Object |
execute(org.apache.felix.service.command.CommandSession session)
|
protected
|
getAllServices(java.lang.Class<T> clazz,
java.lang.String filter)
|
org.osgi.framework.BundleContext |
getBundleContext()
|
protected
|
getService(java.lang.Class<T> clazz,
org.osgi.framework.ServiceReference reference)
|
void |
setBundleContext(org.osgi.framework.BundleContext bundleContext)
|
protected void |
ungetServices()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bundleContext
protected org.osgi.framework.BundleContext bundleContext
usedReferences
protected java.util.List<org.osgi.framework.ServiceReference> usedReferences
OsgiCommandSupport
public OsgiCommandSupport()
execute
public java.lang.Object execute(org.apache.felix.service.command.CommandSession session)
throws Exception
- Specified by:
execute
in interface Action
- Overrides:
execute
in class AbstractAction
- Throws:
Exception
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()
setBundleContext
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
- Specified by:
setBundleContext
in interface BundleContextAware
getAllServices
protected <T> java.util.List<T> getAllServices(java.lang.Class<T> clazz,
java.lang.String filter)
throws Exception
- Throws:
Exception
getService
protected <T> T getService(java.lang.Class<T> clazz,
org.osgi.framework.ServiceReference reference)
ungetServices
protected void ungetServices()
Copyright © 2007-2011 Apache Software Foundation. All Rights Reserved.