Knopflerfish OSGi 5.2.0

org.knopflerfish.service.remotefw
Interface RemoteFramework


public interface RemoteFramework

Service interface for remote framework connections.

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.txt
 
for more information.


Method Summary
 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.
 

Method Detail

connect

BundleContext connect(java.lang.String host)
Connect to a remote framework.

The host string is implementation specific, but the SOAP implementation uses the form http://[host]:[port]

If the connection fails, a RuntimeException is thrown.

Returns:
Context representing the remote framework.
Throws:
java.lang.RuntimeException - if the connection fails

disconnect

void disconnect(BundleContext bc)
Disconnect from a previously connected framework.

Parameters:
bc - Context representing the remote framework. If the context is not previously returned from connect, do nothing.

getSystemProperties

java.util.Map<java.lang.String,java.lang.String> getSystemProperties(BundleContext bc)
Get system properties from a remote framework.

Parameters:
bc - Context representing the remote framework. Must be a context previously returned from connect
Returns:
Map of key/value (String/String) pairs representing all system properties on the remote framework.
Throws:
java.lang.IllegalArgumentException - if bc is not a context returned from connect

Knopflerfish OSGi 5.2.0