Package com.yahoo.container.bundle
Class MockBundle
- java.lang.Object
-
- com.yahoo.container.bundle.MockBundle
-
- All Implemented Interfaces:
Comparable<org.osgi.framework.Bundle>
,org.osgi.framework.Bundle
,org.osgi.framework.BundleReference
,org.osgi.framework.wiring.BundleWiring
,org.osgi.resource.Wiring
public class MockBundle extends Object implements org.osgi.framework.Bundle, org.osgi.framework.wiring.BundleWiring
- Author:
- gjoranv, ollivir
-
-
Field Summary
Fields Modifier and Type Field Description static org.osgi.framework.Version
BundleVersion
static String
SymbolicName
-
Constructor Summary
Constructors Constructor Description MockBundle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
adapt(Class<T> type)
int
compareTo(org.osgi.framework.Bundle o)
Enumeration<URL>
findEntries(String path, String filePattern, boolean recurse)
List<URL>
findEntries(String p1, String p2, int p3)
org.osgi.framework.Bundle
getBundle()
org.osgi.framework.BundleContext
getBundleContext()
long
getBundleId()
List<org.osgi.framework.wiring.BundleCapability>
getCapabilities(String p1)
ClassLoader
getClassLoader()
File
getDataFile(String filename)
URL
getEntry(String path)
Enumeration<String>
getEntryPaths(String path)
Dictionary<String,String>
getHeaders()
Dictionary<String,String>
getHeaders(String locale)
long
getLastModified()
String
getLocation()
List<org.osgi.resource.Wire>
getProvidedResourceWires(String p1)
List<org.osgi.framework.wiring.BundleWire>
getProvidedWires(String p1)
org.osgi.framework.ServiceReference<?>[]
getRegisteredServices()
List<org.osgi.resource.Wire>
getRequiredResourceWires(String p1)
List<org.osgi.framework.wiring.BundleWire>
getRequiredWires(String p1)
List<org.osgi.framework.wiring.BundleRequirement>
getRequirements(String p1)
org.osgi.framework.wiring.BundleRevision
getResource()
URL
getResource(String name)
List<org.osgi.resource.Capability>
getResourceCapabilities(String p1)
List<org.osgi.resource.Requirement>
getResourceRequirements(String p1)
Enumeration<URL>
getResources(String name)
org.osgi.framework.wiring.BundleRevision
getRevision()
org.osgi.framework.ServiceReference<?>[]
getServicesInUse()
Map<X509Certificate,List<X509Certificate>>
getSignerCertificates(int signersType)
int
getState()
String
getSymbolicName()
org.osgi.framework.Version
getVersion()
boolean
hasPermission(Object permission)
boolean
isCurrent()
boolean
isInUse()
Collection<String>
listResources(String p1, String p2, int p3)
Class<?>
loadClass(String name)
void
start()
void
start(int options)
void
stop()
void
stop(int options)
void
uninstall()
void
update()
void
update(InputStream input)
-
-
-
Field Detail
-
SymbolicName
public static final String SymbolicName
- See Also:
- Constant Field Values
-
BundleVersion
public static final org.osgi.framework.Version BundleVersion
-
-
Method Detail
-
getState
public int getState()
- Specified by:
getState
in interfaceorg.osgi.framework.Bundle
-
start
public void start(int options)
- Specified by:
start
in interfaceorg.osgi.framework.Bundle
-
start
public void start()
- Specified by:
start
in interfaceorg.osgi.framework.Bundle
-
stop
public void stop(int options)
- Specified by:
stop
in interfaceorg.osgi.framework.Bundle
-
stop
public void stop()
- Specified by:
stop
in interfaceorg.osgi.framework.Bundle
-
update
public void update(InputStream input)
- Specified by:
update
in interfaceorg.osgi.framework.Bundle
-
update
public void update()
- Specified by:
update
in interfaceorg.osgi.framework.Bundle
-
uninstall
public void uninstall()
- Specified by:
uninstall
in interfaceorg.osgi.framework.Bundle
-
getHeaders
public Dictionary<String,String> getHeaders(String locale)
- Specified by:
getHeaders
in interfaceorg.osgi.framework.Bundle
-
getSymbolicName
public String getSymbolicName()
- Specified by:
getSymbolicName
in interfaceorg.osgi.framework.Bundle
-
getVersion
public org.osgi.framework.Version getVersion()
- Specified by:
getVersion
in interfaceorg.osgi.framework.Bundle
-
getLocation
public String getLocation()
- Specified by:
getLocation
in interfaceorg.osgi.framework.Bundle
-
getBundleId
public long getBundleId()
- Specified by:
getBundleId
in interfaceorg.osgi.framework.Bundle
-
getHeaders
public Dictionary<String,String> getHeaders()
- Specified by:
getHeaders
in interfaceorg.osgi.framework.Bundle
-
getRegisteredServices
public org.osgi.framework.ServiceReference<?>[] getRegisteredServices()
- Specified by:
getRegisteredServices
in interfaceorg.osgi.framework.Bundle
-
getServicesInUse
public org.osgi.framework.ServiceReference<?>[] getServicesInUse()
- Specified by:
getServicesInUse
in interfaceorg.osgi.framework.Bundle
-
hasPermission
public boolean hasPermission(Object permission)
- Specified by:
hasPermission
in interfaceorg.osgi.framework.Bundle
-
getResource
public URL getResource(String name)
- Specified by:
getResource
in interfaceorg.osgi.framework.Bundle
-
loadClass
public Class<?> loadClass(String name)
- Specified by:
loadClass
in interfaceorg.osgi.framework.Bundle
-
getResources
public Enumeration<URL> getResources(String name)
- Specified by:
getResources
in interfaceorg.osgi.framework.Bundle
-
getEntryPaths
public Enumeration<String> getEntryPaths(String path)
- Specified by:
getEntryPaths
in interfaceorg.osgi.framework.Bundle
-
getEntry
public URL getEntry(String path)
- Specified by:
getEntry
in interfaceorg.osgi.framework.Bundle
-
findEntries
public Enumeration<URL> findEntries(String path, String filePattern, boolean recurse)
- Specified by:
findEntries
in interfaceorg.osgi.framework.Bundle
-
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interfaceorg.osgi.framework.Bundle
-
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()
- Specified by:
getBundleContext
in interfaceorg.osgi.framework.Bundle
-
getSignerCertificates
public Map<X509Certificate,List<X509Certificate>> getSignerCertificates(int signersType)
- Specified by:
getSignerCertificates
in interfaceorg.osgi.framework.Bundle
-
adapt
public <T> T adapt(Class<T> type)
- Specified by:
adapt
in interfaceorg.osgi.framework.Bundle
-
getDataFile
public File getDataFile(String filename)
- Specified by:
getDataFile
in interfaceorg.osgi.framework.Bundle
-
compareTo
public int compareTo(org.osgi.framework.Bundle o)
- Specified by:
compareTo
in interfaceComparable<org.osgi.framework.Bundle>
-
findEntries
public List<URL> findEntries(String p1, String p2, int p3)
- Specified by:
findEntries
in interfaceorg.osgi.framework.wiring.BundleWiring
-
getRequiredResourceWires
public List<org.osgi.resource.Wire> getRequiredResourceWires(String p1)
- Specified by:
getRequiredResourceWires
in interfaceorg.osgi.framework.wiring.BundleWiring
- Specified by:
getRequiredResourceWires
in interfaceorg.osgi.resource.Wiring
-
getResourceCapabilities
public List<org.osgi.resource.Capability> getResourceCapabilities(String p1)
- Specified by:
getResourceCapabilities
in interfaceorg.osgi.framework.wiring.BundleWiring
- Specified by:
getResourceCapabilities
in interfaceorg.osgi.resource.Wiring
-
isCurrent
public boolean isCurrent()
- Specified by:
isCurrent
in interfaceorg.osgi.framework.wiring.BundleWiring
-
getRequiredWires
public List<org.osgi.framework.wiring.BundleWire> getRequiredWires(String p1)
- Specified by:
getRequiredWires
in interfaceorg.osgi.framework.wiring.BundleWiring
-
getCapabilities
public List<org.osgi.framework.wiring.BundleCapability> getCapabilities(String p1)
- Specified by:
getCapabilities
in interfaceorg.osgi.framework.wiring.BundleWiring
-
getProvidedResourceWires
public List<org.osgi.resource.Wire> getProvidedResourceWires(String p1)
- Specified by:
getProvidedResourceWires
in interfaceorg.osgi.framework.wiring.BundleWiring
- Specified by:
getProvidedResourceWires
in interfaceorg.osgi.resource.Wiring
-
getProvidedWires
public List<org.osgi.framework.wiring.BundleWire> getProvidedWires(String p1)
- Specified by:
getProvidedWires
in interfaceorg.osgi.framework.wiring.BundleWiring
-
getRevision
public org.osgi.framework.wiring.BundleRevision getRevision()
- Specified by:
getRevision
in interfaceorg.osgi.framework.wiring.BundleWiring
-
getResourceRequirements
public List<org.osgi.resource.Requirement> getResourceRequirements(String p1)
- Specified by:
getResourceRequirements
in interfaceorg.osgi.framework.wiring.BundleWiring
- Specified by:
getResourceRequirements
in interfaceorg.osgi.resource.Wiring
-
isInUse
public boolean isInUse()
- Specified by:
isInUse
in interfaceorg.osgi.framework.wiring.BundleWiring
-
listResources
public Collection<String> listResources(String p1, String p2, int p3)
- Specified by:
listResources
in interfaceorg.osgi.framework.wiring.BundleWiring
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfaceorg.osgi.framework.wiring.BundleWiring
-
getRequirements
public List<org.osgi.framework.wiring.BundleRequirement> getRequirements(String p1)
- Specified by:
getRequirements
in interfaceorg.osgi.framework.wiring.BundleWiring
-
getResource
public org.osgi.framework.wiring.BundleRevision getResource()
- Specified by:
getResource
in interfaceorg.osgi.framework.wiring.BundleWiring
- Specified by:
getResource
in interfaceorg.osgi.resource.Wiring
-
getBundle
public org.osgi.framework.Bundle getBundle()
- Specified by:
getBundle
in interfaceorg.osgi.framework.BundleReference
-
-