|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.scr.impl.manager.AbstractComponentManager
org.apache.felix.scr.impl.manager.ImmediateComponentManager
public class ImmediateComponentManager
The default ComponentManager. Objects of this class are responsible for managing implementation object's lifecycle.
Nested Class Summary |
---|
Field Summary |
---|
Fields inherited from interface org.apache.felix.scr.Component |
---|
STATE_ACTIVATING, STATE_ACTIVE, STATE_DEACTIVATING, STATE_DESTROYED, STATE_DISABLED, STATE_DISABLING, STATE_DISPOSED, STATE_DISPOSING, STATE_ENABLED, STATE_ENABLING, STATE_FACTORY, STATE_REGISTERED, STATE_UNSATISFIED |
Constructor Summary | |
---|---|
ImmediateComponentManager(BundleComponentActivator activator,
ComponentHolder componentHolder,
ComponentMetadata metadata)
The constructor receives both the activator and the metadata |
Method Summary | |
---|---|
protected boolean |
createComponent()
Method is called by #activate() in STATE_ACTIVATING or by
DelayedComponentManager.getService(Bundle, ServiceRegistration)
in STATE_REGISTERED. |
protected Object |
createImplementationObject(ComponentContext componentContext)
|
protected void |
deleteComponent(int reason)
|
protected void |
disposeImplementationObject(Object implementationObject,
ComponentContext componentContext,
int reason)
|
ComponentInstance |
getComponentInstance()
Returns the org.osgi.service.component.ComponentInstance
representing this component or null if this component
is not been activated yet. |
Dictionary |
getProperties()
Returns the (private copy) of the Component properties to be used for the ComponentContext as well as eventual service registration. |
protected Object |
getService()
Returns the service object to be registered if the service element is specified. |
boolean |
hasConfiguration()
|
void |
reconfigure(Dictionary configuration)
Called by the Configuration Admin Service to update the component with Configuration properties. |
protected void |
setFactoryProperties(Dictionary dictionary)
|
Methods inherited from class org.apache.felix.scr.impl.manager.AbstractComponentManager |
---|
copyTo, copyTo, disable, dispose, enable, getActivate, getActivator, getBundle, getClassName, getComponentMetadata, getConfigurationPolicy, getDeactivate, getFactory, getId, getModified, getName, getReferences, getServiceProperties, getServices, getState, isActivateDeclared, isDeactivateDeclared, isDefaultEnabled, isImmediate, isLogEnabled, isServiceFactory, log, log, registerComponentService, registerService, state, toString, unregisterComponentService, verifyDependencyManagers |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ImmediateComponentManager(BundleComponentActivator activator, ComponentHolder componentHolder, ComponentMetadata metadata)
activator
- metadata
- Method Detail |
---|
protected boolean createComponent()
AbstractComponentManager
#activate()
in STATE_ACTIVATING or by
DelayedComponentManager.getService(Bundle, ServiceRegistration)
in STATE_REGISTERED.
createComponent
in class AbstractComponentManager
true
if creation of the component succeeded. If
false
is returned, the cause should have been logged.protected void deleteComponent(int reason)
deleteComponent
in class AbstractComponentManager
public ComponentInstance getComponentInstance()
Component
org.osgi.service.component.ComponentInstance
representing this component or null
if this component
is not been activated yet.
protected Object createImplementationObject(ComponentContext componentContext)
protected void disposeImplementationObject(Object implementationObject, ComponentContext componentContext, int reason)
protected Object getService()
Extensions of this class may overwrite this method to return a ServiceFactory to register in the case of a delayed or a service factory component.
getService
in class AbstractComponentManager
protected void setFactoryProperties(Dictionary dictionary)
public boolean hasConfiguration()
hasConfiguration
in class AbstractComponentManager
public Dictionary getProperties()
Method implements the Component Properties provisioning as described in 112.6, Component Properties.
getProperties
in interface Component
getProperties
in class AbstractComponentManager
public void reconfigure(Dictionary configuration)
This causes the component to be reactivated with the new configuration
unless no configuration has ever been set on this component and the
configuration
parameter is null
. In this case
nothing is to be done. If a configuration has previously been set and
now the configuration is deleted, the configuration
parameter is null
and the component has to be reactivated
with the default configuration.
configuration
- The configuration properties for the component from
the Configuration Admin Service or null
if there is
no configuration or if the configuration has just been deleted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |