public class CodecServiceImpl extends DefaultComponent implements CodecService
Modifier and Type | Field and Description |
---|---|
static int |
APPLICATION_STARTED_ORDER |
static String |
CODEC_XP |
protected Map<String,CodecFactory> |
codecFactories |
protected Map<String,CodecDescriptor> |
configs |
lastModified
Constructor and Description |
---|
CodecServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
int |
getApplicationStartedOrder()
The component notification order for
Component.applicationStarted(org.nuxeo.runtime.model.ComponentContext) . |
<T> Codec<T> |
getCodec(String codecName,
Class<T> objectClass)
Returns a codec able to code and decode object of type T
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterContribution, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted
public static final String CODEC_XP
public static final int APPLICATION_STARTED_ORDER
protected final Map<String,CodecDescriptor> configs
protected final Map<String,CodecFactory> codecFactories
public CodecServiceImpl()
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public int getApplicationStartedOrder()
Component
Component.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.
Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
getApplicationStartedOrder
in interface Component
public void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic <T> Codec<T> getCodec(String codecName, Class<T> objectClass)
CodecService
getCodec
in interface CodecService
T
- The class name of the objectcodecName
- the name of the registered codec implementationobjectClass
- the object class of the object to encode decodeCopyright © 2018 Nuxeo. All rights reserved.