|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.ipojo.Handler
org.apache.felix.ipojo.composite.CompositeHandler
org.apache.felix.ipojo.composite.service.provides.ProvidedServiceHandler
public class ProvidedServiceHandler
Composite Provided Service Handler.
| Field Summary | |
|---|---|
private org.osgi.framework.BundleContext |
m_context
External context. |
private ProvidedServiceHandlerDescription |
m_description
Handler description. |
private java.util.List |
m_exporters
List of exporters. |
private java.util.List |
m_managedServices
List of managed services. |
private java.util.List |
m_services
List of "available" services in the internal context. |
private java.util.List |
m_types
List of component type. |
| Fields inherited from class org.apache.felix.ipojo.composite.CompositeHandler |
|---|
HANDLER_TYPE |
| Fields inherited from class org.apache.felix.ipojo.Handler |
|---|
HANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid |
| Constructor Summary | |
|---|---|
ProvidedServiceHandler()
|
|
| Method Summary | |
|---|---|
private void |
checkRequirement(ServiceImporter imp,
Element elem)
Check the correctness of the composite requirement against the service level dependency. |
private void |
checkServiceSpecification(ProvidedService svc)
Check composite requirement against service specification requirement is available. |
private void |
computeAvailableServices()
Build the list of available specifications. |
private void |
computeAvailableTypes()
Build available instance types. |
void |
configure(Element metadata,
java.util.Dictionary configuration)
Configure the handler. |
private ServiceImporter |
getAttachedRequirement(Element element)
Look for the implementation (i.e. |
HandlerDescription |
getDescription()
Returns the current handler description. |
java.util.List |
getInstanceType()
|
protected java.util.List |
getSpecifications()
Build the list of available specification. |
void |
initializeComponentFactory(ComponentTypeDescription desc,
Element metadata)
Initialize the component type. |
void |
invalidate(DependencyModel exporter)
Notify the handler that an exporter becomes invalid. |
private void |
isHandlerValid()
Check the handler validity. |
void |
start()
Start method. |
void |
stateChanged(int state)
Handler state changed. |
void |
stop()
Stop method. |
void |
validate(DependencyModel exporter)
Notify the handler that an exporter becomes valid. |
| Methods inherited from class org.apache.felix.ipojo.composite.CompositeHandler |
|---|
attach, getCompositeManager, getHandler, getLogger, setFactory |
| Methods inherited from class org.apache.felix.ipojo.Handler |
|---|
debug, error, error, getHandlerManager, getValidity, info, isValid, reconfigure, setValidity, warn, warn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.osgi.framework.BundleContext m_context
private java.util.List m_services
private java.util.List m_exporters
private java.util.List m_managedServices
private java.util.List m_types
private ProvidedServiceHandlerDescription m_description
| Constructor Detail |
|---|
public ProvidedServiceHandler()
| Method Detail |
|---|
public void initializeComponentFactory(ComponentTypeDescription desc,
Element metadata)
throws ConfigurationException
initializeComponentFactory in class Handlerdesc - : component type description to populate.metadata - : component type metadata.
ConfigurationException - : metadata are incorrect.Handler.initializeComponentFactory(org.apache.felix.ipojo.architecture.ComponentTypeDescription, org.apache.felix.ipojo.metadata.Element)
public void configure(Element metadata,
java.util.Dictionary configuration)
throws ConfigurationException
configure in class Handlermetadata - : the metadata of the componentconfiguration - : the instance configuration
ConfigurationException - : the exporter cannot be createdorg.apache.felix.ipojo.CompositeHandler#configure(org.apache.felix.ipojo.CompositeManager, org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)public void start()
start in class Handlerorg.apache.felix.ipojo.CompositeHandler#start()public void stop()
stop in class Handlerorg.apache.felix.ipojo.CompositeHandler#stop()private void isHandlerValid()
org.apache.felix.ipojo.CompositeHandler#isValid()public void stateChanged(int state)
stateChanged in class Handlerstate - : the new instance state.org.apache.felix.ipojo.CompositeHandler#stateChanged(int)public void invalidate(DependencyModel exporter)
invalidate in interface DependencyStateListenerexporter - : the implicated exporter.public void validate(DependencyModel exporter)
validate in interface DependencyStateListenerexporter - : the implicated exporter.protected java.util.List getSpecifications()
private void computeAvailableServices()
private void checkServiceSpecification(ProvidedService svc)
throws CompositionException
svc - : the provided service to check
CompositionException - : occurs if the specification field of the service specification cannot be analyzed correctly.private ServiceImporter getAttachedRequirement(Element element)
element - : the service-level requirement metadata
private void checkRequirement(ServiceImporter imp,
Element elem)
throws CompositionException
imp - : requirement to checkelem - : service-level dependency metadata
CompositionException - : occurs if the requirement does not match with service-level specification requirementpublic HandlerDescription getDescription()
Handler
getDescription in class Handlerprivate void computeAvailableTypes()
public java.util.List getInstanceType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||