org.apache.felix.ipojo.composite.service.instantiator
Class ServiceDependencyHandler

java.lang.Object
  extended by org.apache.felix.ipojo.Handler
      extended by org.apache.felix.ipojo.composite.CompositeHandler
          extended by org.apache.felix.ipojo.composite.service.instantiator.ServiceDependencyHandler
All Implemented Interfaces:
DependencyStateListener

public class ServiceDependencyHandler
extends CompositeHandler
implements DependencyStateListener

Service Instantiator Class. This handler allows to instantiate service instance inside the composition.

Author:
Felix Project Team

Field Summary
 
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
ServiceDependencyHandler()
           
 
Method Summary
 void configure(Element metadata, Dictionary conf)
          Configure the handler.
 HandlerDescription getDescription()
          Get the service instantiator handler description.
 List getInstances()
           
 List getRequirements()
           
 void invalidate(DependencyModel dep)
          A service instance becomes invalid.
 void start()
          Start the service instantiator handler.
 void stateChanged(int newState)
          State change callback.
 void stop()
          Handler stop method.
 void validate(DependencyModel dep)
          An service instance 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, initializeComponentFactory, isValid, reconfigure, setValidity, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDependencyHandler

public ServiceDependencyHandler()
Method Detail

configure

public void configure(Element metadata,
                      Dictionary conf)
               throws ConfigurationException
Configure the handler.

Specified by:
configure in class Handler
Parameters:
metadata - : the metadata of the component
conf - : the instance configuration
Throws:
ConfigurationException - : the specification attribute is missing
See Also:
org.apache.felix.ipojo.CompositeHandler#configure(org.apache.felix.ipojo.CompositeManager, org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)

start

public void start()
Start the service instantiator handler. Start all created service instance.

Specified by:
start in class Handler
See Also:
org.apache.felix.ipojo.CompositeHandler#start()

stop

public void stop()
Handler stop method. Stop all created service instance.

Specified by:
stop in class Handler
See Also:
org.apache.felix.ipojo.CompositeHandler#stop()

stateChanged

public void stateChanged(int newState)
State change callback. This method is used to freeze the set of used provider if the static binding policy is used.

Overrides:
stateChanged in class Handler
Parameters:
newState - : the new state of the underlying instance
See Also:
Handler.stateChanged(int)

validate

public void validate(DependencyModel dep)
An service instance becomes valid.

Specified by:
validate in interface DependencyStateListener
Parameters:
dep - : dependency becoming valid.

invalidate

public void invalidate(DependencyModel dep)
A service instance becomes invalid.

Specified by:
invalidate in interface DependencyStateListener
Parameters:
dep - : dependency becoming valid.

getDescription

public HandlerDescription getDescription()
Get the service instantiator handler description.

Overrides:
getDescription in class Handler
Returns:
the description
See Also:
org.apache.felix.ipojo.CompositeHandler#getDescription()

getInstances

public List getInstances()

getRequirements

public List getRequirements()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.