org.objectweb.dsrg.sofa.osgi
Class ProxyActivator

java.lang.Object
  extended by org.objectweb.dsrg.sofa.osgi.ProxyActivator
All Implemented Interfaces:
RegistrationListener, org.osgi.framework.BundleActivator

public class ProxyActivator
extends java.lang.Object
implements org.osgi.framework.BundleActivator, RegistrationListener

Proxy Bundle activator

The bundle register itself (through the RegistrationListener interface) within the SOFA2 runtime when it starts. Moreover, it handles service registration/unregistration (managed by the SOFA2 runtime)


Constructor Summary
ProxyActivator()
           
 
Method Summary
 boolean register(java.lang.Object object, java.util.Dictionary properties)
          Registers an OSGi service
 void start(org.osgi.framework.BundleContext context)
          Called when proxy bundle starts
 void stop(org.osgi.framework.BundleContext context)
          Called when proxy bundle stops
 boolean unregister(java.lang.Object service)
          Unregisters an OSGi service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyActivator

public ProxyActivator()
Method Detail

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Called when proxy bundle starts

Specified by:
start in interface org.osgi.framework.BundleActivator
Parameters:
context - the execution context
Throws:
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
Called when proxy bundle stops

Specified by:
stop in interface org.osgi.framework.BundleActivator
Parameters:
context - the execution context
Throws:
java.lang.Exception

register

public boolean register(java.lang.Object object,
                        java.util.Dictionary properties)
Registers an OSGi service

Specified by:
register in interface RegistrationListener
Parameters:
object - the service implementation
properties - the service properties
Returns:
true is success, false otherwise

unregister

public boolean unregister(java.lang.Object service)
Unregisters an OSGi service

Specified by:
unregister in interface RegistrationListener
Parameters:
service - the service implementation
Returns:
true if success, false otherwise