Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  Bundle

    public class EntryLookupControllingMockBundle

extends MockBundle

Dedicated Mock Bundle that provides control over the returned entries for lookup calls.

Author:
  Adrian Colyer

Field Summary
`protected URL` | `nextEntryResult`
`protected Enumeration` | `nextFindResult`

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
`EntryLookupControllingMockBundle(Dictionary headers)` Constructs a new `EntryLookupControllingMockBundle` instance.

Method Summary
`protected Enumeration` | `createEnumerationOver(String[] entries)`
`Enumeration` | `findEntries(String path, String filePattern, boolean recurse)` Delegates to the classloader.
`BundleContext` | `getContext()`
`URL` | `getEntry(String name)`
`URL` | `getResource(String name)`
`void` | `setEntryReturnOnNextCallToGetEntry(URL entry)`
`void` | `setResultsToReturnOnNextCallToFindEntries(String[] findResult)`

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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### nextFindResult

    protected Enumeration nextFindResult

### nextEntryResult

    protected URL nextEntryResult

Constructor Detail

### EntryLookupControllingMockBundle

    public EntryLookupControllingMockBundle(Dictionary headers)

  Constructs a new `EntryLookupControllingMockBundle` instance.

  Parameters:
    `headers` -

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 Spring Framework. All Rights Reserved.