public abstract class OsgiCommandSupport extends AbstractAction implements Action, BundleContextAware
Modifier and Type | Field and Description |
---|---|
protected org.osgi.framework.BundleContext |
bundleContext |
protected List<org.osgi.framework.ServiceReference> |
usedReferences |
log, session
Constructor and Description |
---|
OsgiCommandSupport() |
Modifier and Type | Method and Description |
---|---|
Object |
execute(org.apache.felix.service.command.CommandSession session) |
protected <T> List<T> |
getAllServices(Class<T> clazz,
String filter) |
org.osgi.framework.BundleContext |
getBundleContext() |
protected <T> T |
getService(Class<T> clazz) |
protected <T> T |
getService(Class<T> clazz,
org.osgi.framework.ServiceReference reference) |
protected <T> T |
getService(org.osgi.framework.ServiceReference<T> reference) |
void |
setBundleContext(org.osgi.framework.BundleContext bundleContext) |
protected void |
ungetServices() |
doExecute
protected org.osgi.framework.BundleContext bundleContext
protected List<org.osgi.framework.ServiceReference> usedReferences
public Object execute(org.apache.felix.service.command.CommandSession session) throws Exception
execute
in interface Action
execute
in class AbstractAction
Exception
public org.osgi.framework.BundleContext getBundleContext()
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
setBundleContext
in interface BundleContextAware
protected <T> List<T> getAllServices(Class<T> clazz, String filter) throws Exception
Exception
protected <T> T getService(Class<T> clazz, org.osgi.framework.ServiceReference reference)
protected <T> T getService(Class<T> clazz)
protected <T> T getService(org.osgi.framework.ServiceReference<T> reference)
protected void ungetServices()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.