Package org.osgi.service.component
Interface ComponentInstance<S>
- Type Parameters:
 S- Type of Service
@ProviderType
public interface ComponentInstance<S>
A ComponentInstance encapsulates a component instance of an activated
 component configuration. ComponentInstances are created whenever a component
 configuration is activated.
 
ComponentInstances are never reused. A new ComponentInstance object will be created when the component configuration is activated again.
- "ThreadSafe"
 
- 
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Dispose of the component configuration for this component instance.Returns the component instance of the activated component configuration. 
- 
Method Details
- 
dispose
void dispose()Dispose of the component configuration for this component instance. The component configuration will be deactivated. If the component configuration has already been deactivated, this method does nothing. - 
getInstance
S getInstance()Returns the component instance of the activated component configuration.- Returns:
 - The component instance or 
nullif the component configuration has been deactivated. 
 
 -