Package org.nuxeo.runtime.codec
Class CodecServiceImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.runtime.codec.CodecServiceImpl
-
- All Implemented Interfaces:
CodecService
,Adaptable
,Component
,Extensible
,TimestampedService
public class CodecServiceImpl extends DefaultComponent implements CodecService
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,CodecFactory>
codecFactories
static String
XP_CODEC
-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description CodecServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getApplicationStartedOrder()
The component notification order forComponent.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 Tvoid
start(ComponentContext context)
Start the component.void
stop(ComponentContext context)
Stop the component.-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterContribution, unregisterExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Component
applicationStarted
-
-
-
-
Field Detail
-
XP_CODEC
public static final String XP_CODEC
- See Also:
- Constant Field Values
-
codecFactories
protected final Map<String,CodecFactory> codecFactories
-
-
Constructor Detail
-
CodecServiceImpl
public CodecServiceImpl()
-
-
Method Detail
-
start
public void start(ComponentContext context)
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
stop
public void stop(ComponentContext context) throws InterruptedException
Description copied from interface:Component
Stop the component.- Specified by:
stop
in interfaceComponent
- Overrides:
stop
in classDefaultComponent
- Throws:
InterruptedException
-
getApplicationStartedOrder
public int getApplicationStartedOrder()
Description copied from interface:Component
The component notification order forComponent.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.
- Specified by:
getApplicationStartedOrder
in interfaceComponent
- Returns:
- the order, 1000 by default
-
getCodec
public <T> Codec<T> getCodec(String codecName, Class<T> objectClass)
Description copied from interface:CodecService
Returns a codec able to code and decode object of type T- Specified by:
getCodec
in interfaceCodecService
- Type Parameters:
T
- The class name of the object- Parameters:
codecName
- the name of the registered codec implementationobjectClass
- the object class of the object to encode decode
-
-