org.eclipse.gemini.blueprint.mock
Class EntryLookupControllingMockBundle
java.lang.Object
org.eclipse.gemini.blueprint.mock.MockBundle
org.eclipse.gemini.blueprint.mock.EntryLookupControllingMockBundle
- All Implemented Interfaces:
- org.osgi.framework.Bundle
public class EntryLookupControllingMockBundle
- extends MockBundle
Dedicated Mock Bundle that provides control over the returned entries for
lookup calls.
- Author:
- Adrian Colyer
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 |
Methods inherited from class org.eclipse.gemini.blueprint.mock.MockBundle |
getBundleContext, getBundleId, getEntryPaths, getHeaders, getHeaders, getLastModified, getLocation, getRegisteredServices, getResources, getServicesInUse, getSignerCertificates, getState, getSymbolicName, getVersion, hasPermission, loadClass, setBundleId, setClassLoader, setLocation, start, start, stop, stop, toString, uninstall, update, update |
nextFindResult
protected Enumeration nextFindResult
nextEntryResult
protected URL nextEntryResult
EntryLookupControllingMockBundle
public EntryLookupControllingMockBundle(Dictionary headers)
- Constructs a new
EntryLookupControllingMockBundle
instance.
- Parameters:
headers
-
setResultsToReturnOnNextCallToFindEntries
public void setResultsToReturnOnNextCallToFindEntries(String[] findResult)
findEntries
public Enumeration findEntries(String path,
String filePattern,
boolean recurse)
- Description copied from class:
MockBundle
- Delegates to the classloader. Identical to classLoader.getResources(path + filePattern);
- Specified by:
findEntries
in interface org.osgi.framework.Bundle
- Overrides:
findEntries
in class MockBundle
- See Also:
Bundle.findEntries(java.lang.String, java.lang.String, boolean)
setEntryReturnOnNextCallToGetEntry
public void setEntryReturnOnNextCallToGetEntry(URL entry)
getEntry
public URL getEntry(String name)
- Specified by:
getEntry
in interface org.osgi.framework.Bundle
- Overrides:
getEntry
in class MockBundle
getResource
public URL getResource(String name)
- Specified by:
getResource
in interface org.osgi.framework.Bundle
- Overrides:
getResource
in class MockBundle
getContext
public org.osgi.framework.BundleContext getContext()
- Overrides:
getContext
in class MockBundle
createEnumerationOver
protected Enumeration createEnumerationOver(String[] entries)
Copyright © 2006-2012. All Rights Reserved.