|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.osgi.testing.internal.OSGiRuntimeImpl
public abstract class OSGiRuntimeImpl
An abstract implementation of the OSGiRuntime
| Constructor Summary | |
|---|---|
OSGiRuntimeImpl(OSGiRuntimeHelper helper)
|
|
| Method Summary | ||
|---|---|---|
void |
addCapability(Capability capability)
Add a Capability to the runtime. |
|
OSGiBundle |
getBundle(String symbolicName,
org.osgi.framework.Version version)
Get the OSGiBundle for a given symbolic name and version
In case the version is left unspecified, it returns the first bundle that
matches the symbolic name. |
|
org.osgi.jmx.framework.BundleStateMBean |
getBundleStateMBean()
Get the BundleStateMBean |
|
org.osgi.jmx.framework.FrameworkMBean |
getFrameworkMBean()
Get the FrameworkMBean |
|
InitialContext |
getInitialContext()
Get the initial naming context for this OSGiRuntime |
|
|
getMBeanProxy(ObjectName name,
Class<T> interf)
Get an MBeanProxy for the given interface. |
|
org.osgi.jmx.framework.PackageStateMBean |
getPackageStateMBean()
Get the PackageStateMBean |
|
String |
getServerHost()
Get the host name that this OSGiRuntime is running on. |
|
OSGiServiceReference |
getServiceReference(String clazz,
long timeout)
Returns a ServiceReference object for a service that implements and was registered under the specified class. |
|
org.osgi.jmx.framework.ServiceStateMBean |
getServiceStateMBean()
Get the ServiceStateMBean |
|
OSGiRuntimeHelper |
getTestHelper()
|
|
OSGiBundle |
installBundle(org.jboss.shrinkwrap.api.Archive<?> archive)
Install an OSGiBundle from the given archive. |
|
OSGiBundle |
installBundle(String location)
Install an OSGiBundle from the given location. |
|
OSGiBundle |
installBundle(org.jboss.osgi.vfs.VirtualFile virtualFile)
Install an OSGiBundle from the given virtual file. |
|
void |
removeCapability(Capability capability)
Remove a Capability from the runtime. |
|
void |
shutdown()
Shutdown the OSGiRuntime. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.osgi.testing.OSGiRuntime |
|---|
getBundle, getBundles, getMBeanServer, getServiceReference, getServiceReferences, isRemoteRuntime, refreshPackages |
| Constructor Detail |
|---|
public OSGiRuntimeImpl(OSGiRuntimeHelper helper)
| Method Detail |
|---|
public OSGiRuntimeHelper getTestHelper()
public void addCapability(Capability capability)
throws org.osgi.framework.BundleException
OSGiRuntimeCapability to the runtime.
Adding a capability recursively adds the orderded set of dependent capabilities
before it installs and starts the orderded set bundles.
addCapability in interface OSGiRuntimeorg.osgi.framework.BundleExceptionpublic void removeCapability(Capability capability)
OSGiRuntimeCapability from the runtime.
Removing a capability does the reverse of OSGiRuntime.addCapability(Capability).
removeCapability in interface OSGiRuntime
public OSGiBundle installBundle(String location)
throws org.osgi.framework.BundleException
OSGiRuntimeOSGiBundle from the given location.
installBundle in interface OSGiRuntimeorg.osgi.framework.BundleException
public OSGiBundle installBundle(org.jboss.shrinkwrap.api.Archive<?> archive)
throws org.osgi.framework.BundleException,
IOException
OSGiRuntimeOSGiBundle from the given archive.
installBundle in interface OSGiRuntimeorg.osgi.framework.BundleException
IOException
public OSGiBundle installBundle(org.jboss.osgi.vfs.VirtualFile virtualFile)
throws org.osgi.framework.BundleException
OSGiRuntimeOSGiBundle from the given virtual file.
installBundle in interface OSGiRuntimeorg.osgi.framework.BundleExceptionpublic void shutdown()
OSGiRuntimeOSGiRuntime.
This will remove added Capability.
shutdown in interface OSGiRuntime
public <T> T getMBeanProxy(ObjectName name,
Class<T> interf)
OSGiRuntime
getMBeanProxy in interface OSGiRuntime
public org.osgi.jmx.framework.FrameworkMBean getFrameworkMBean()
throws IOException
OSGiRuntime
getFrameworkMBean in interface OSGiRuntimeIOException
public org.osgi.jmx.framework.BundleStateMBean getBundleStateMBean()
throws IOException
OSGiRuntime
getBundleStateMBean in interface OSGiRuntimeIOException
public org.osgi.jmx.framework.PackageStateMBean getPackageStateMBean()
throws IOException
OSGiRuntime
getPackageStateMBean in interface OSGiRuntimeIOException
public org.osgi.jmx.framework.ServiceStateMBean getServiceStateMBean()
throws IOException
OSGiRuntime
getServiceStateMBean in interface OSGiRuntimeIOException
public InitialContext getInitialContext()
throws NamingException
OSGiRuntimeOSGiRuntime
getInitialContext in interface OSGiRuntimeNamingExceptionpublic String getServerHost()
OSGiRuntimeOSGiRuntime is running on.
This is the value of the 'jboss.bind.address' system property.
getServerHost in interface OSGiRuntime
public OSGiBundle getBundle(String symbolicName,
org.osgi.framework.Version version)
OSGiRuntimeOSGiBundle for a given symbolic name and version
In case the version is left unspecified, it returns the first bundle that
matches the symbolic name.
getBundle in interface OSGiRuntimeversion - may be null
public OSGiServiceReference getServiceReference(String clazz,
long timeout)
OSGiRuntime
getServiceReference in interface OSGiRuntimetimeout - the timeout to wait for the service to become available
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||