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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<ComponentInstanceImpl.OSGiServiceFactory> protected Objectprotected RegistrationInfo -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Activates the implementation instance.voidcreate()protected ObjectvoidDeactivates the implementation instance.voiddestroy()Destroys this instance.<T> TgetAdapter(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 voidhandleError(String message, RuntimeMessage.Source source, String sourceId, Exception e) voidregisterExtension(Extension extension) Registers the given extension.voidRegister provided services as OSGi servicesvoidstart()Starts the implementation instance.voidstop()Stops the implementation instance.toString()voidunregisterExtension(Extension extension) Unregisters the given extension.void
-
Field Details
-
instance
-
ri
-
factories
-
-
Constructor Details
-
ComponentInstanceImpl
-
-
Method Details
-
getInstance
Description copied from interface:ComponentInstanceGets the actual component implementation instance.- Specified by:
getInstancein interfaceComponentInstance- Returns:
- the component implementation instance
-
create
public void create() -
createInstance
-
destroy
public void destroy()Description copied from interface:ComponentInstanceDestroys this instance.- Specified by:
destroyin interfaceComponentInstance
-
getContext
Description copied from interface:ComponentInstanceGets the runtime context attached to this instance.- Specified by:
getContextin interfaceComponentInstance- Returns:
- the runtime context
-
getName
Description copied from interface:ComponentInstanceGets the name of the component.- Specified by:
getNamein interfaceComponentInstance- Returns:
- the component name
-
activate
public void activate()Description copied from interface:ComponentInstanceActivates the implementation instance.- Specified by:
activatein interfaceComponentInstance
-
deactivate
public void deactivate()Description copied from interface:ComponentInstanceDeactivates the implementation instance.- Specified by:
deactivatein interfaceComponentInstance
-
start
public void start()Description copied from interface:ComponentInstanceStarts the implementation instance.- Specified by:
startin interfaceComponentInstance- Since:
- 9.3
-
stop
Description copied from interface:ComponentInstanceStops the implementation instance.- Specified by:
stopin interfaceComponentInstance- Throws:
InterruptedException- Since:
- 9.3
-
registerExtension
Description copied from interface:ExtensibleRegisters the given extension.- Specified by:
registerExtensionin interfaceExtensible- Parameters:
extension- the extension to register
-
unregisterExtension
Description copied from interface:ExtensibleUnregisters the given extension.- Specified by:
unregisterExtensionin 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:AdaptableReturns an object which is an instance of the given class associated with this object. Returnsnullif no such object can be found.- Specified by:
getAdapterin interfaceAdaptable- Parameters:
adapter- the adapter class to look up- Returns:
- a object castable to the given class, or
nullif this object does not have an adapter for the given class
-
getPropertyNames
- Specified by:
getPropertyNamesin interfaceComponentContext
-
getProperty
- Specified by:
getPropertyin interfaceComponentContext
-
getRuntimeContext
- Specified by:
getRuntimeContextin interfaceComponentContext
-
getPropertyValue
- Specified by:
getPropertyValuein interfaceComponentContext
-
getPropertyValue
- Specified by:
getPropertyValuein interfaceComponentContext
-
getProvidedServiceNames
Description copied from interface:ComponentInstanceGets the list of provided services, or null if no service is provided.- Specified by:
getProvidedServiceNamesin 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:ComponentInstanceGets the Registration Info- Specified by:
getRegistrationInfoin interfaceComponentInstance- Returns:
- the registration info
-