|
||||||||||
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
org.apache.felix.scr.impl.manager.DelayedComponentManager
public class DelayedComponentManager
The DelayedComponentManager
TODO
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 | |
---|---|
DelayedComponentManager(BundleComponentActivator activator,
ComponentHolder componentHolder,
ComponentMetadata metadata)
|
Method Summary | |
---|---|
protected boolean |
createComponent()
Method is called by #activate() in STATE_ACTIVATING or by
getService(Bundle, ServiceRegistration)
in STATE_REGISTERED. |
protected boolean |
createRealComponent()
|
protected void |
deleteComponent(int reason)
|
protected Object |
getService()
Returns the service object to be registered if the service element is specified. |
Object |
getService(Bundle bundle,
ServiceRegistration sr)
Creates a new service object. |
void |
ungetService(Bundle bundle,
ServiceRegistration sr,
Object service)
Releases a service object. |
Methods inherited from class org.apache.felix.scr.impl.manager.ImmediateComponentManager |
---|
createImplementationObject, disposeImplementationObject, getComponentInstance, getProperties, hasConfiguration, reconfigure, setFactoryProperties |
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 DelayedComponentManager(BundleComponentActivator activator, ComponentHolder componentHolder, ComponentMetadata metadata)
activator
- metadata
- Method Detail |
---|
protected boolean createComponent()
AbstractComponentManager
#activate()
in STATE_ACTIVATING or by
getService(Bundle, ServiceRegistration)
in STATE_REGISTERED.
createComponent
in class ImmediateComponentManager
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 ImmediateComponentManager
protected Object getService()
ImmediateComponentManager
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 ImmediateComponentManager
public Object getService(Bundle bundle, ServiceRegistration sr)
ServiceFactory
The Framework invokes this method the first time the specified
bundle
requests a service object using the
BundleContext.getService(ServiceReference)
method. The
service factory can then return a specific service object for each
bundle.
The Framework caches the value returned (unless it is null
),
and will return the same service object on any future call to
BundleContext.getService
for the same bundle. This means the
Framework must not allow this method to be concurrently called for the
same bundle.
The Framework will check if the returned service object is an instance of
all the classes named when the service was registered. If not, then
null
is returned to the bundle.
getService
in interface ServiceFactory
bundle
- The bundle using the service.sr
- The ServiceRegistration
object for the
service.
BundleContext.getService(org.osgi.framework.ServiceReference)
protected boolean createRealComponent()
public void ungetService(Bundle bundle, ServiceRegistration sr, Object service)
ServiceFactory
The Framework invokes this method when a service has been released by a bundle. The service object may then be destroyed.
ungetService
in interface ServiceFactory
bundle
- The bundle releasing the service.sr
- The ServiceRegistration
object for the
service.service
- The service object returned by a previous call to the
ServiceFactory.getService
method.BundleContext.ungetService(org.osgi.framework.ServiceReference)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |