Class OsgiInjectableValues
java.lang.Object
com.fasterxml.jackson.databind.InjectableValues
com.fasterxml.jackson.module.osgi.OsgiInjectableValues
public class OsgiInjectableValues
extends com.fasterxml.jackson.databind.InjectableValues
Injects OSGI services in deserialized objects
Use the
Use the
JacksonInject
in the constructor parameters or the class members ask for injecting a matching OSGI services.
Use the JacksonInject.value()
to specify an OSGI filter to select more accurately the OSGI services.
Null is injected when no matching OSGI service is registered.-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.InjectableValues
com.fasterxml.jackson.databind.InjectableValues.Std
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindInjectableValue
(Object valueId, com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty forProperty, Object beanInstance) private Object
findService
(String type, String filter) private String
serviceFilter
(Object valueId) private static String
serviceType
(com.fasterxml.jackson.databind.BeanProperty forProperty)
-
Field Details
-
bundleContext
private final org.osgi.framework.BundleContext bundleContext
-
-
Constructor Details
-
OsgiInjectableValues
public OsgiInjectableValues(org.osgi.framework.BundleContext bundleContext)
-
-
Method Details
-
findInjectableValue
public Object findInjectableValue(Object valueId, com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty forProperty, Object beanInstance) - Specified by:
findInjectableValue
in classcom.fasterxml.jackson.databind.InjectableValues
-
findService
-
serviceType
-
serviceFilter
-