|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.osgi.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, STARTING, 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 namepublic 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 contextMethod Detail |
---|
public Enumeration findEntries(String path, String filePattern, boolean recurse)
findEntries
in interface Bundle
Bundle.findEntries(java.lang.String,
java.lang.String, boolean)
public long getBundleId()
getBundleId
in interface Bundle
public void setBundleId(long bundleId)
public URL getEntry(String name)
getEntry
in interface Bundle
public Enumeration getEntryPaths(String path)
getEntryPaths
in interface Bundle
public Dictionary getHeaders()
getHeaders
in interface Bundle
public Dictionary getHeaders(String locale)
getHeaders
in interface Bundle
public long getLastModified()
getLastModified
in interface Bundle
public String getLocation()
getLocation
in interface Bundle
public ServiceReference[] getRegisteredServices()
getRegisteredServices
in interface Bundle
public URL getResource(String name)
getResource
in interface Bundle
public Enumeration getResources(String name) throws IOException
getResources
in interface Bundle
IOException
public ServiceReference[] getServicesInUse()
getServicesInUse
in interface Bundle
public int getState()
getState
in interface Bundle
public String getSymbolicName()
getSymbolicName
in interface Bundle
public boolean hasPermission(Object permission)
hasPermission
in interface Bundle
public Class loadClass(String name) throws ClassNotFoundException
loadClass
in interface Bundle
ClassNotFoundException
public void start() throws BundleException
start
in interface Bundle
BundleException
public void start(int options) throws BundleException
BundleException
public void stop() throws BundleException
stop
in interface Bundle
BundleException
public void stop(int options) throws BundleException
BundleException
public void uninstall() throws BundleException
uninstall
in interface Bundle
BundleException
public void update() throws BundleException
update
in interface Bundle
BundleException
public void update(InputStream in) throws BundleException
update
in interface Bundle
BundleException
public BundleContext getContext()
public BundleContext getBundleContext()
public String toString()
toString
in class Object
public 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 |