Class SpringTransientHandler

java.lang.Object
com.vaadin.kubernetes.starter.sessiontracker.serialization.SpringTransientHandler
All Implemented Interfaces:
TransientHandler

public class SpringTransientHandler extends Object implements 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 Details

    • SpringTransientHandler

      public SpringTransientHandler(org.springframework.context.ApplicationContext appCtx)
  • Method Details

    • inject

      public void inject(Object obj, List<TransientDescriptor> transients)
      Description copied from interface: TransientHandler
      Injects values into the transient fields of given object.
      Specified by:
      inject in interface TransientHandler
      Parameters:
      obj - object target of injection, never null.
      transients - descriptors of transient fields that should be injected, never null.
    • inspect

      public List<TransientDescriptor> inspect(Object target)
      Description copied from interface: TransientHandler
      Inspects an object for injectable transient fields and returns a description of the field and a symbolic reference of the instance in the form of TransientDescriptor objects. If no eligible transient fields are found, the method must return an empty list.
      Specified by:
      inspect in interface TransientHandler
      Parameters:
      target - object to be inspected for transient fields.
      Returns:
      transient fields descriptors, never null.