Class SpringTransientHandler
java.lang.Object
com.vaadin.kubernetes.starter.sessiontracker.serialization.SpringTransientHandler
- All Implemented Interfaces:
TransientHandler
Spring specific implementation of
TransientHandler, capable to
inspect and inject Spring Beans into transient fields.
Inspection finds all transient fields whose actual value matches a Spring
managed bean. The bean name is stored into TransientDescriptor and it
is used on injection phase to lookup the correct bean.-
Constructor Summary
ConstructorsConstructorDescriptionSpringTransientHandler(org.springframework.context.ApplicationContext appCtx) -
Method Summary
Modifier and TypeMethodDescriptionvoidinject(Object obj, List<TransientDescriptor> transients) Injects values into the transient fields of given object.Inspects an object for injectable transient fields and returns a description of the field and a symbolic reference of the instance in the form ofTransientDescriptorobjects.
-
Constructor Details
-
SpringTransientHandler
public SpringTransientHandler(org.springframework.context.ApplicationContext appCtx)
-
-
Method Details
-
inject
Description copied from interface:TransientHandlerInjects values into the transient fields of given object.- Specified by:
injectin interfaceTransientHandler- Parameters:
obj- object target of injection, never null.transients- descriptors of transient fields that should be injected, never null.
-
inspect
Description copied from interface:TransientHandlerInspects an object for injectable transient fields and returns a description of the field and a symbolic reference of the instance in the form ofTransientDescriptorobjects. If no eligible transient fields are found, the method must return an empty list.- Specified by:
inspectin interfaceTransientHandler- Parameters:
target- object to be inspected for transient fields.- Returns:
- transient fields descriptors, never null.
-