public final class CamelBlueprintHelper extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CamelBlueprintHelper.TestBundleActivator
Bundle activator that will be invoked in right time to set initial configadmin configuration
for blueprint container.
|
Modifier and Type | Field and Description |
---|---|
static String |
BUNDLE_FILTER |
static String |
BUNDLE_VERSION |
static long |
DEFAULT_TIMEOUT |
Modifier and Type | Method and Description |
---|---|
static org.osgi.framework.BundleContext |
createBundleContext(String name,
String descriptors,
boolean includeTestBundle) |
static org.osgi.framework.BundleContext |
createBundleContext(String name,
String descriptors,
boolean includeTestBundle,
String bundleFilter,
String testBundleVersion) |
static org.osgi.framework.BundleContext |
createBundleContext(String name,
String descriptors,
boolean includeTestBundle,
String bundleFilter,
String testBundleVersion,
String testBundleDirectives,
String[]... configAdminPidFiles) |
static org.osgi.framework.BundleContext |
createBundleContext(String name,
String bundleFilter,
org.ops4j.pax.swissbox.tinybundles.core.TinyBundle bundle) |
protected static org.ops4j.pax.swissbox.tinybundles.core.TinyBundle |
createTestBundle(String name,
String version,
String descriptors,
String[]... configAdminPidFiles) |
static void |
disposeBundleContext(org.osgi.framework.BundleContext bundleContext) |
protected static Collection<URL> |
getBlueprintDescriptors(String descriptors)
Gets the bundle descriptors as
URL resources. |
static <T> T |
getOsgiService(org.osgi.framework.BundleContext bundleContext,
Class<T> type) |
static <T> T |
getOsgiService(org.osgi.framework.BundleContext bundleContext,
Class<T> type,
long timeout) |
static <T> T |
getOsgiService(org.osgi.framework.BundleContext bundleContext,
Class<T> type,
String filter) |
static <T> T |
getOsgiService(org.osgi.framework.BundleContext bundleContext,
Class<T> type,
String filter,
long timeout) |
static void |
setPersistentFileForConfigAdmin(org.osgi.framework.BundleContext bundleContext,
String pid,
String fileName,
Dictionary props,
String symbolicName,
Set<Long> bpEvents,
boolean expectReload) |
static void |
waitForBlueprintContainer(Set<Long> eventHistory,
org.osgi.framework.BundleContext context,
String symbolicName,
int bpEvent,
Runnable runAndWait)
Synchronization method to wait for particular state of BlueprintContainer under test.
|
public static final long DEFAULT_TIMEOUT
public static final String BUNDLE_FILTER
public static final String BUNDLE_VERSION
public static org.osgi.framework.BundleContext createBundleContext(String name, String descriptors, boolean includeTestBundle) throws Exception
Exception
public static org.osgi.framework.BundleContext createBundleContext(String name, String descriptors, boolean includeTestBundle, String bundleFilter, String testBundleVersion) throws Exception
Exception
public static org.osgi.framework.BundleContext createBundleContext(String name, String descriptors, boolean includeTestBundle, String bundleFilter, String testBundleVersion, String testBundleDirectives, String[]... configAdminPidFiles) throws Exception
Exception
public static org.osgi.framework.BundleContext createBundleContext(String name, String bundleFilter, org.ops4j.pax.swissbox.tinybundles.core.TinyBundle bundle) throws Exception
Exception
public static void disposeBundleContext(org.osgi.framework.BundleContext bundleContext) throws org.osgi.framework.BundleException
org.osgi.framework.BundleException
public static void setPersistentFileForConfigAdmin(org.osgi.framework.BundleContext bundleContext, String pid, String fileName, Dictionary props, String symbolicName, Set<Long> bpEvents, boolean expectReload) throws IOException, InterruptedException
IOException
InterruptedException
public static <T> T getOsgiService(org.osgi.framework.BundleContext bundleContext, Class<T> type, long timeout)
public static <T> T getOsgiService(org.osgi.framework.BundleContext bundleContext, Class<T> type)
public static <T> T getOsgiService(org.osgi.framework.BundleContext bundleContext, Class<T> type, String filter)
public static <T> T getOsgiService(org.osgi.framework.BundleContext bundleContext, Class<T> type, String filter, long timeout)
public static void waitForBlueprintContainer(Set<Long> eventHistory, org.osgi.framework.BundleContext context, String symbolicName, int bpEvent, Runnable runAndWait) throws InterruptedException
InterruptedException
protected static org.ops4j.pax.swissbox.tinybundles.core.TinyBundle createTestBundle(String name, String version, String descriptors, String[]... configAdminPidFiles) throws IOException
IOException
protected static Collection<URL> getBlueprintDescriptors(String descriptors) throws FileNotFoundException, MalformedURLException
URL
resources.descriptors
- the bundle descriptors, can be separated by commaFileNotFoundException
- is thrown if a bundle descriptor cannot be foundMalformedURLException
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.