Package org.nuxeo.runtime.model.impl
Class ComponentInstanceImpl
java.lang.Object
org.nuxeo.runtime.model.impl.ComponentInstanceImpl
- All Implemented Interfaces:
Adaptable
,ComponentContext
,ComponentInstance
,Extensible
- Author:
- Bogdan Stefanescu
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<ComponentInstanceImpl.OSGiServiceFactory>
protected Object
protected RegistrationInfo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Activates the implementation instance.void
create()
protected Object
void
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.Gets the runtime context attached to this instance.Gets the actual component implementation instance.getName()
Gets the name of the component.getProperty
(String property) String[]
getPropertyValue
(String property) getPropertyValue
(String property, Object defValue) String[]
Gets the list of provided services, or null if no service is provided.Gets the Registration Infoprotected void
handleError
(String message, RuntimeMessage.Source source, String sourceId, Exception e) void
registerExtension
(Extension extension) Registers the given extension.void
Register provided services as OSGi servicesvoid
start()
Starts the implementation instance.void
stop()
Stops the implementation instance.toString()
void
unregisterExtension
(Extension extension) Unregisters the given extension.void
-
Field Details
-
instance
-
ri
-
factories
-
-
Constructor Details
-
ComponentInstanceImpl
-
-
Method Details
-
getInstance
Description copied from interface:ComponentInstance
Gets the actual component implementation instance.- Specified by:
getInstance
in interfaceComponentInstance
- Returns:
- the component implementation instance
-
create
public void create() -
createInstance
-
destroy
public void destroy()Description copied from interface:ComponentInstance
Destroys this instance.- Specified by:
destroy
in interfaceComponentInstance
-
getContext
Description copied from interface:ComponentInstance
Gets the runtime context attached to this instance.- Specified by:
getContext
in interfaceComponentInstance
- Returns:
- the runtime context
-
getName
Description copied from interface:ComponentInstance
Gets the name of the component.- Specified by:
getName
in interfaceComponentInstance
- Returns:
- the component name
-
activate
public void activate()Description copied from interface:ComponentInstance
Activates the implementation instance.- Specified by:
activate
in interfaceComponentInstance
-
deactivate
public void deactivate()Description copied from interface:ComponentInstance
Deactivates the implementation instance.- Specified by:
deactivate
in interfaceComponentInstance
-
start
public void start()Description copied from interface:ComponentInstance
Starts the implementation instance.- Specified by:
start
in interfaceComponentInstance
- Since:
- 9.3
-
stop
Description copied from interface:ComponentInstance
Stops the implementation instance.- Specified by:
stop
in interfaceComponentInstance
- Throws:
InterruptedException
- Since:
- 9.3
-
registerExtension
Description copied from interface:Extensible
Registers the given extension.- Specified by:
registerExtension
in interfaceExtensible
- Parameters:
extension
- the extension to register
-
unregisterExtension
Description copied from interface:Extensible
Unregisters the given extension.- Specified by:
unregisterExtension
in interfaceExtensible
- Parameters:
extension
- the extension to unregister
-
handleError
protected void handleError(String message, RuntimeMessage.Source source, String sourceId, Exception e) -
getAdapter
Description copied from interface:Adaptable
Returns an object which is an instance of the given class associated with this object. Returnsnull
if no such object can be found.- Specified by:
getAdapter
in interfaceAdaptable
- Parameters:
adapter
- the adapter class to look up- Returns:
- a object castable to the given class, or
null
if this object does not have an adapter for the given class
-
getPropertyNames
- Specified by:
getPropertyNames
in interfaceComponentContext
-
getProperty
- Specified by:
getProperty
in interfaceComponentContext
-
getRuntimeContext
- Specified by:
getRuntimeContext
in interfaceComponentContext
-
getPropertyValue
- Specified by:
getPropertyValue
in interfaceComponentContext
-
getPropertyValue
- Specified by:
getPropertyValue
in interfaceComponentContext
-
getProvidedServiceNames
Description copied from interface:ComponentInstance
Gets the list of provided services, or null if no service is provided.- Specified by:
getProvidedServiceNames
in interfaceComponentInstance
- Returns:
- an array containing the service class names or null if no service is provided
-
registerServices
public void registerServices()Register provided services as OSGi services -
unregisterServices
public void unregisterServices() -
toString
-
getRegistrationInfo
Description copied from interface:ComponentInstance
Gets the Registration Info- Specified by:
getRegistrationInfo
in interfaceComponentInstance
- Returns:
- the registration info
-