public final class MockBundle extends Object implements org.osgi.framework.Bundle
Bundle implementation.| Constructor and Description |
|---|
MockBundle(org.osgi.framework.BundleContext bundleContext)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
<A> A |
adapt(Class<A> type) |
int |
compareTo(org.osgi.framework.Bundle o) |
Enumeration<URL> |
findEntries(String path,
String filePattern,
boolean recurse) |
org.osgi.framework.BundleContext |
getBundleContext() |
long |
getBundleId() |
File |
getDataFile(String filename) |
URL |
getEntry(String name) |
Enumeration<String> |
getEntryPaths(String path) |
Dictionary<String,String> |
getHeaders() |
Dictionary<String,String> |
getHeaders(String locale) |
long |
getLastModified() |
String |
getLocation() |
org.osgi.framework.ServiceReference[] |
getRegisteredServices() |
URL |
getResource(String name) |
Enumeration<URL> |
getResources(String name) |
org.osgi.framework.ServiceReference[] |
getServicesInUse() |
Map<X509Certificate,List<X509Certificate>> |
getSignerCertificates(int signersType) |
int |
getState() |
String |
getSymbolicName() |
org.osgi.framework.Version |
getVersion() |
boolean |
hasPermission(Object permission) |
Class<?> |
loadClass(String name) |
void |
setHeaders(Map<String,String> value)
Set headers for mock bundle
|
void |
setLastModified(long lastModified)
Set the last modified value for the mock bundle
|
void |
setSymbolicName(String value)
Set symbolic name for mock bundle
|
void |
start() |
void |
start(int options) |
void |
stop() |
void |
stop(int options) |
void |
uninstall() |
void |
update() |
void |
update(InputStream inputStream) |
public MockBundle(org.osgi.framework.BundleContext bundleContext)
bundleContext - Bundle contextpublic long getBundleId()
getBundleId in interface org.osgi.framework.Bundlepublic org.osgi.framework.BundleContext getBundleContext()
getBundleContext in interface org.osgi.framework.Bundlepublic URL getEntry(String name)
getEntry in interface org.osgi.framework.Bundlepublic int getState()
getState in interface org.osgi.framework.Bundlepublic Dictionary<String,String> getHeaders()
getHeaders in interface org.osgi.framework.Bundlepublic Dictionary<String,String> getHeaders(String locale)
getHeaders in interface org.osgi.framework.Bundlepublic void setHeaders(Map<String,String> value)
value - Header mappublic String getSymbolicName()
getSymbolicName in interface org.osgi.framework.Bundlepublic void setSymbolicName(String value)
value - Symbolic namepublic long getLastModified()
getLastModified in interface org.osgi.framework.Bundlepublic void setLastModified(long lastModified)
lastModified - last modifiedpublic Enumeration<String> getEntryPaths(String path)
getEntryPaths in interface org.osgi.framework.Bundlepublic Enumeration<URL> findEntries(String path, String filePattern, boolean recurse)
findEntries in interface org.osgi.framework.Bundlepublic String getLocation()
getLocation in interface org.osgi.framework.Bundlepublic org.osgi.framework.ServiceReference[] getRegisteredServices()
getRegisteredServices in interface org.osgi.framework.Bundlepublic URL getResource(String name)
getResource in interface org.osgi.framework.Bundlepublic Enumeration<URL> getResources(String name)
getResources in interface org.osgi.framework.Bundlepublic org.osgi.framework.ServiceReference[] getServicesInUse()
getServicesInUse in interface org.osgi.framework.Bundlepublic boolean hasPermission(Object permission)
hasPermission in interface org.osgi.framework.Bundlepublic Class<?> loadClass(String name)
loadClass in interface org.osgi.framework.Bundlepublic void start()
start in interface org.osgi.framework.Bundlepublic void stop()
stop in interface org.osgi.framework.Bundlepublic void uninstall()
uninstall in interface org.osgi.framework.Bundlepublic void update()
update in interface org.osgi.framework.Bundlepublic void update(InputStream inputStream)
update in interface org.osgi.framework.Bundlepublic void start(int options)
start in interface org.osgi.framework.Bundlepublic void stop(int options)
stop in interface org.osgi.framework.Bundlepublic Map<X509Certificate,List<X509Certificate>> getSignerCertificates(int signersType)
getSignerCertificates in interface org.osgi.framework.Bundlepublic org.osgi.framework.Version getVersion()
getVersion in interface org.osgi.framework.Bundlepublic int compareTo(org.osgi.framework.Bundle o)
compareTo in interface Comparable<org.osgi.framework.Bundle>public <A> A adapt(Class<A> type)
adapt in interface org.osgi.framework.BundleCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.