public class ComponentInstanceImpl extends Object implements ComponentInstance
Modifier and Type | Class and Description |
---|---|
protected class |
ComponentInstanceImpl.OSGiServiceFactory |
Modifier and Type | Field and Description |
---|---|
protected List<ComponentInstanceImpl.OSGiServiceFactory> |
factories |
protected Object |
instance |
protected RegistrationInfoImpl |
ri |
Constructor and Description |
---|
ComponentInstanceImpl(RegistrationInfoImpl ri) |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates the implementation instance.
|
void |
create() |
protected Object |
createInstance() |
void |
deactivate()
Deactivates the implementation instance.
|
void |
destroy()
Destroys this instance.
|
<T> T |
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class associated with this object.
|
RuntimeContext |
getContext()
Gets the runtime context attached to this instance.
|
Object |
getInstance()
Gets the actual component implementation instance.
|
ComponentName |
getName()
Gets the name of the component.
|
Property |
getProperty(String property) |
String[] |
getPropertyNames() |
Object |
getPropertyValue(String property) |
Object |
getPropertyValue(String property,
Object defValue) |
String[] |
getProvidedServiceNames()
Gets the list of provided services, or null if no service is provided.
|
RuntimeContext |
getRuntimeContext() |
protected void |
handleError(String message,
Exception e) |
void |
registerExtension(Extension extension)
Registers the given extension.
|
void |
registerServices()
Register provided services as OSGi services
|
void |
reload()
Reload the component.
|
String |
toString() |
void |
unregisterExtension(Extension extension)
Unregisters the given extension.
|
void |
unregisterServices() |
protected RegistrationInfoImpl ri
protected List<ComponentInstanceImpl.OSGiServiceFactory> factories
public ComponentInstanceImpl(RegistrationInfoImpl ri)
public Object getInstance()
ComponentInstance
getInstance
in interface ComponentInstance
public void create()
protected Object createInstance()
public void destroy()
ComponentInstance
destroy
in interface ComponentInstance
public RuntimeContext getContext()
ComponentInstance
getContext
in interface ComponentInstance
public ComponentName getName()
ComponentInstance
getName
in interface ComponentInstance
public void activate()
ComponentInstance
activate
in interface ComponentInstance
public void deactivate()
ComponentInstance
deactivate
in interface ComponentInstance
public void reload()
ComponentInstance
reload
in interface ComponentInstance
public void registerExtension(Extension extension)
Extensible
registerExtension
in interface Extensible
extension
- the extension to registerpublic void unregisterExtension(Extension extension)
Extensible
unregisterExtension
in interface Extensible
extension
- the extension to unregisterprotected void handleError(String message, Exception e)
public <T> T getAdapter(Class<T> adapter)
Adaptable
null
if no such object can be found.getAdapter
in interface Adaptable
adapter
- the adapter class to look upnull
if this object does not have an adapter for
the given classpublic String[] getPropertyNames()
getPropertyNames
in interface ComponentContext
public Property getProperty(String property)
getProperty
in interface ComponentContext
public RuntimeContext getRuntimeContext()
getRuntimeContext
in interface ComponentContext
public Object getPropertyValue(String property)
getPropertyValue
in interface ComponentContext
public Object getPropertyValue(String property, Object defValue)
getPropertyValue
in interface ComponentContext
public String[] getProvidedServiceNames()
ComponentInstance
getProvidedServiceNames
in interface ComponentInstance
public void registerServices()
public void unregisterServices()
Copyright © 2015 Nuxeo SA. All rights reserved.