org.knopflerfish.service.remotefw
public interface RemoteFramework
By connecting to a remote framework, a client gets access to a BundleContext representing the entire remote platform. This BundleContext can be used as a normal context, installing/starting/stopping bundles, adding listeners, getting service references etc.
Some service instances as StartLevel and PackageAdmin may also be remotely accessible via the context. For services not remotely accessible, properties are still available (such as service id, object class array etc)
Registering service instances are not likely to be supported. Some differences in bundle and service event sematics may also be present, since eventing may be handled with some delay.
Currently, the only known implementation is by using SOAP access to the remote framework. See
osgi/bundles_opt/soap/readme.txtfor more information.
| Modifier and Type | Method and Description |
|---|---|
BundleContext |
connect(java.lang.String host)
Connect to a remote framework.
|
void |
disconnect(BundleContext bc)
Disconnect from a previously connected framework.
|
java.util.Map<java.lang.String,java.lang.String> |
getSystemProperties(BundleContext bc)
Get system properties from a remote framework.
|
BundleContext connect(java.lang.String host)
The host string is implementation specific, but the SOAP implementation uses the form http://[host]:[port]
If the connection fails, a RuntimeException is thrown.
java.lang.RuntimeException - if the connection failsvoid disconnect(BundleContext bc)
bc - Context representing the remote framework. If the
context is not previously returned from connect,
do nothing.java.util.Map<java.lang.String,java.lang.String> getSystemProperties(BundleContext bc)
bc - Context representing the remote framework. Must be
a context previously returned from connectjava.lang.IllegalArgumentException - if bc is not a context returned
from connect