|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.gemini.blueprint.mock.MockBundle
public class MockBundle
Bundle mock. Except resource/class loading operations (which are executed on its internal class loader), the rest of the methods are dummies.
| Field Summary |
|---|
| Fields inherited from interface org.osgi.framework.Bundle |
|---|
ACTIVE, INSTALLED, RESOLVED, SIGNERS_ALL, SIGNERS_TRUSTED, START_ACTIVATION_POLICY, START_TRANSIENT, STARTING, STOP_TRANSIENT, STOPPING, UNINSTALLED |
| Constructor Summary | |
|---|---|
MockBundle()
Constructs a new MockBundle instance using default values. |
|
MockBundle(BundleContext context)
Constructs a new MockBundle instance associated with the given bundle context. |
|
MockBundle(Dictionary headers)
Constructs a new MockBundle instance with the given bundle headers. |
|
MockBundle(String symName)
Constructs a new MockBundle instance with the given symbolic name. |
|
MockBundle(String symName,
Dictionary headers,
BundleContext context)
Constructs a new MockBundle instance using the given bundle symbolic name, properties and associated
bundle context. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MockBundle()
MockBundle instance using default values.
public MockBundle(Dictionary headers)
MockBundle instance with the given bundle headers.
headers - bundle headerspublic MockBundle(BundleContext context)
MockBundle instance associated with the given bundle context.
context - associated bundle contextpublic MockBundle(String symName)
MockBundle instance with the given symbolic name.
symName - bundle symbolic name
public MockBundle(String symName,
Dictionary headers,
BundleContext context)
MockBundle instance using the given bundle symbolic name, properties and associated
bundle context.
symName - bundle symbolic nameheaders - bundle headerscontext - associated bundle context| Method Detail |
|---|
public Enumeration findEntries(String path,
String filePattern,
boolean recurse)
findEntries in interface BundleBundle.findEntries(java.lang.String, java.lang.String, boolean)public long getBundleId()
getBundleId in interface Bundlepublic void setBundleId(long bundleId)
public URL getEntry(String name)
getEntry in interface Bundlepublic Enumeration getEntryPaths(String path)
getEntryPaths in interface Bundlepublic Dictionary getHeaders()
getHeaders in interface Bundlepublic Dictionary getHeaders(String locale)
getHeaders in interface Bundlepublic long getLastModified()
getLastModified in interface Bundlepublic String getLocation()
getLocation in interface Bundlepublic ServiceReference[] getRegisteredServices()
getRegisteredServices in interface Bundlepublic URL getResource(String name)
getResource in interface Bundle
public Enumeration getResources(String name)
throws IOException
getResources in interface BundleIOExceptionpublic ServiceReference[] getServicesInUse()
getServicesInUse in interface Bundlepublic int getState()
getState in interface Bundlepublic String getSymbolicName()
getSymbolicName in interface Bundlepublic boolean hasPermission(Object permission)
hasPermission in interface Bundle
public Class<?> loadClass(String name)
throws ClassNotFoundException
loadClass in interface BundleClassNotFoundException
public void start()
throws BundleException
start in interface BundleBundleException
public void start(int options)
throws BundleException
start in interface BundleBundleException
public void stop()
throws BundleException
stop in interface BundleBundleException
public void stop(int options)
throws BundleException
stop in interface BundleBundleException
public void uninstall()
throws BundleException
uninstall in interface BundleBundleException
public void update()
throws BundleException
update in interface BundleBundleException
public void update(InputStream in)
throws BundleException
update in interface BundleBundleExceptionpublic Version getVersion()
getVersion in interface Bundlepublic Map getSignerCertificates(int signerType)
getSignerCertificates in interface Bundlepublic BundleContext getContext()
public BundleContext getBundleContext()
getBundleContext in interface Bundlepublic String toString()
toString in class Objectpublic void setLocation(String location)
location - bundle locationpublic void setClassLoader(ClassLoader loader)
loader - mock bundle class loader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||