org.apache.felix.servicebinder.impl
Class ArchitectureServiceImpl

java.lang.Object
  extended by org.apache.felix.servicebinder.impl.ArchitectureServiceImpl
All Implemented Interfaces:
ArchitectureService, Lifecycle

public class ArchitectureServiceImpl
extends java.lang.Object
implements ArchitectureService, Lifecycle

Class that implements the architecture service an object of this class is created when the service binder bundle is activated

Author:
Felix Project Team

Constructor Summary
ArchitectureServiceImpl()
           
 
Method Summary
 void activate()
          This method is called after the instance is created, all of its dependencies are valid, and all implemented services are registered.
static void addInstanceReference(InstanceReference ref)
           
 void addServiceBinderListener(ServiceBinderListener listener)
          Add a service binder listener
 void deactivate()
          This method is called prior to instance disposal.
static InstanceReference findInstanceReference(java.lang.Object obj)
           
 void fireDependencyChangeEvent(DependencyChangeEvent evt)
          Fires an event when a dependency has changed
 void fireInstanceChangeEvent(InstanceChangeEvent evt)
          Fires an event when an instance has changed
 Instance[] getInstances()
          Get a list of all the available instance references
static ArchitectureServiceImpl getReference()
           
static void removeInstanceReference(InstanceReference ref)
           
 void removeServiceBinderListener(ServiceBinderListener listener)
          Remove a service binder listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArchitectureServiceImpl

public ArchitectureServiceImpl()
                        throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

findInstanceReference

public static InstanceReference findInstanceReference(java.lang.Object obj)

addInstanceReference

public static void addInstanceReference(InstanceReference ref)

removeInstanceReference

public static void removeInstanceReference(InstanceReference ref)

getInstances

public Instance[] getInstances()
Description copied from interface: ArchitectureService
Get a list of all the available instance references

Specified by:
getInstances in interface ArchitectureService
Returns:
a List containing all of the instance references

getReference

public static ArchitectureServiceImpl getReference()

activate

public void activate()
Description copied from interface: Lifecycle
This method is called after the instance is created, all of its dependencies are valid, and all implemented services are registered.

Specified by:
activate in interface Lifecycle

deactivate

public void deactivate()
Description copied from interface: Lifecycle
This method is called prior to instance disposal. At the time of invocation, all dependencies are still valid and all services are still registered. Be aware that at this point some dependent services may have been shutdown and using them may result in error conditions.

Specified by:
deactivate in interface Lifecycle

addServiceBinderListener

public void addServiceBinderListener(ServiceBinderListener listener)
Add a service binder listener

Specified by:
addServiceBinderListener in interface ArchitectureService
Parameters:
listener - a ServiceBinderListener to add to the Architecture service

removeServiceBinderListener

public void removeServiceBinderListener(ServiceBinderListener listener)
Remove a service binder listener

Specified by:
removeServiceBinderListener in interface ArchitectureService
Parameters:
listener - the listener to be removed

fireInstanceChangeEvent

public void fireInstanceChangeEvent(InstanceChangeEvent evt)
Fires an event when an instance has changed


fireDependencyChangeEvent

public void fireDependencyChangeEvent(DependencyChangeEvent evt)
Fires an event when a dependency has changed