Interface PreDestructor<I>

Type Parameters:
I - the type of contextual instance
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

An interface whose implementation perform pre-destruction logic for contextual instances.

PreDestructors are typically used during the execution of a Factory's Factory.destroy(Object, Request) method.

Author:
Laird Nelson
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Performs pre-destruction logic for the supplied contextual instance.
  • Method Details

    • preDestroy

      I preDestroy(I i, Request<I> r)
      Performs pre-destruction logic for the supplied contextual instance.
      Parameters:
      i - a contextual instance; must not be null
      r - a Request; msut not be null
      Returns:
      i as supplied
      Throws:
      NullPointerException - if either argument is null