org.springframework.osgi.mock
Class EntryLookupControllingMockBundle
java.lang.Object
org.springframework.osgi.mock.MockBundle
org.springframework.osgi.mock.EntryLookupControllingMockBundle
- All Implemented Interfaces:
- Bundle
public class EntryLookupControllingMockBundle
- extends MockBundle
Mock Bundle that allows the entry to return on future calls.
- Author:
- Adrian Colyer
Methods inherited from class org.springframework.osgi.mock.MockBundle |
getBundleContext, getBundleId, getEntryPaths, getHeaders, getHeaders, getLastModified, getLocation, getRegisteredServices, getResources, getServicesInUse, getState, getSymbolicName, hasPermission, loadClass, setBundleId, setLocation, start, start, stop, stop, toString, uninstall, update, update |
nextFindResult
protected Enumeration nextFindResult
nextEntryResult
protected URL nextEntryResult
EntryLookupControllingMockBundle
public EntryLookupControllingMockBundle(Dictionary 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 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 Bundle
- Overrides:
getEntry
in class MockBundle
getResource
public URL getResource(String name)
- Specified by:
getResource
in interface Bundle
- Overrides:
getResource
in class MockBundle
getContext
public BundleContext getContext()
- Overrides:
getContext
in class MockBundle
createEnumerationOver
protected Enumeration createEnumerationOver(String[] entries)
Copyright © 2006-2009 Spring Framework. All Rights Reserved.