org.apache.felix.ipojo.composite.service.provides
Class ProvidedService

java.lang.Object
  extended by org.apache.felix.ipojo.composite.service.provides.ProvidedService
All Implemented Interfaces:
DependencyStateListener

public class ProvidedService
extends Object
implements DependencyStateListener

Composite Provided Service.

Author:
Felix Project Team

Constructor Summary
ProvidedService(ProvidedServiceHandler handler, Element element, String name)
          Constructor.
 
Method Summary
protected  CompositeManager getManager()
           
 String getSpecification()
           
 void invalidate(DependencyModel exporter)
          The exporter becomes invalid.
 boolean isRegistered()
           
 void register()
          Register the exposed service.
 void start()
          Start method.
 void stop()
          Stop the provided service.
 void unregister()
          Unregister the exposed service.
 void validate(DependencyModel exporter)
          The exporter becomes valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProvidedService

public ProvidedService(ProvidedServiceHandler handler,
                       Element element,
                       String name)
Constructor. The delegation mapping is infers in this method.

Parameters:
handler - : the handler.
element - : 'provides' element.
name - : name of this provided service.
Method Detail

start

public void start()
           throws CompositionException
Start method. Build service implementation type, factory and instance.

Throws:
CompositionException - if a consistent mapping cannot be discovered.

stop

public void stop()
Stop the provided service. Kill the exporter, the instance and the factory.


getManager

protected CompositeManager getManager()

validate

public void validate(DependencyModel exporter)
The exporter becomes valid.

Specified by:
validate in interface DependencyStateListener
Parameters:
exporter - : the exporter

invalidate

public void invalidate(DependencyModel exporter)
The exporter becomes invalid.

Specified by:
invalidate in interface DependencyStateListener
Parameters:
exporter - : the exporter

getSpecification

public String getSpecification()

unregister

public void unregister()
Unregister the exposed service.


register

public void register()
Register the exposed service.


isRegistered

public boolean isRegistered()


Copyright © 2011 Apache Software Foundation. All Rights Reserved.