|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OSGiRuntime
An abstraction of an OSGi Runtime.
| Method Summary | ||
|---|---|---|
void |
addCapability(Capability capability)
Add a Capability to the runtime. |
|
OSGiBundle |
getBundle(long bundleId)
Get the OSGiBundle for a given bundle id. |
|
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. |
|
OSGiBundle[] |
getBundles()
Get the array of installed OSGiBundles |
|
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. |
|
MBeanServerConnection |
getMBeanServer()
Get the MBeanServerConnection for this OSGiRuntime |
|
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)
Returns a ServiceReference object for a service that implements and was registered under the specified class. |
|
OSGiServiceReference |
getServiceReference(String clazz,
long timeout)
Returns a ServiceReference object for a service that implements and was registered under the specified class. |
|
OSGiServiceReference[] |
getServiceReferences(String clazz,
String filter)
Returns an array of ServiceReference objects. |
|
org.osgi.jmx.framework.ServiceStateMBean |
getServiceStateMBean()
Get the ServiceStateMBean |
|
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 vfsfile)
Install an OSGiBundle from the given virtual file. |
|
boolean |
isRemoteRuntime()
Return true if this OSGiRuntime connects to a remote Framework. |
|
void |
refreshPackages(OSGiBundle[] bundles)
Refresh the packages through PackageAdmin.refreshPackages(org.osgi.framework.Bundle[]) |
|
void |
removeCapability(Capability capability)
Remove a Capability from the runtime. |
|
void |
shutdown()
Shutdown the OSGiRuntime. |
|
| Method Detail |
|---|
void addCapability(Capability capability)
throws org.osgi.framework.BundleException
Capability to the runtime.
Adding a capability recursively adds the orderded set of dependent capabilities
before it installs and starts the orderded set bundles.
org.osgi.framework.BundleExceptionvoid removeCapability(Capability capability)
Capability from the runtime.
Removing a capability does the reverse of addCapability(Capability).
OSGiBundle installBundle(org.jboss.shrinkwrap.api.Archive<?> archive)
throws org.osgi.framework.BundleException,
IOException
OSGiBundle from the given archive.
org.osgi.framework.BundleException
IOException
OSGiBundle installBundle(org.jboss.osgi.vfs.VirtualFile vfsfile)
throws org.osgi.framework.BundleException,
IOException
OSGiBundle from the given virtual file.
org.osgi.framework.BundleException
IOException
OSGiBundle installBundle(String location)
throws org.osgi.framework.BundleException
OSGiBundle from the given location.
org.osgi.framework.BundleExceptionMBeanServerConnection getMBeanServer()
OSGiRuntime
<T> T getMBeanProxy(ObjectName name,
Class<T> interf)
org.osgi.jmx.framework.FrameworkMBean getFrameworkMBean()
throws IOException
IOException
org.osgi.jmx.framework.BundleStateMBean getBundleStateMBean()
throws IOException
IOException
org.osgi.jmx.framework.ServiceStateMBean getServiceStateMBean()
throws IOException
IOException
org.osgi.jmx.framework.PackageStateMBean getPackageStateMBean()
throws IOException
IOExceptionOSGiBundle[] getBundles()
OSGiBundles
OSGiBundle getBundle(String symbolicName,
org.osgi.framework.Version version)
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.
version - may be null
OSGiBundle getBundle(long bundleId)
OSGiBundle for a given bundle id.
OSGiServiceReference getServiceReference(String clazz)
OSGiServiceReference getServiceReference(String clazz,
long timeout)
timeout - the timeout to wait for the service to become available
OSGiServiceReference[] getServiceReferences(String clazz,
String filter)
InitialContext getInitialContext()
throws NamingException
OSGiRuntime
NamingExceptionString getServerHost()
OSGiRuntime is running on.
This is the value of the 'jboss.bind.address' system property.
boolean isRemoteRuntime()
OSGiRuntime connects to a remote Framework.
void refreshPackages(OSGiBundle[] bundles)
throws IOException
PackageAdmin.refreshPackages(org.osgi.framework.Bundle[])
IOExceptionvoid shutdown()
OSGiRuntime.
This will remove added Capability.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||