Interface Creation<I>

Type Parameters:
I - the type of instance being created
All Known Subinterfaces:
Request<I>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Creation<I>
A representation of a Factory's creation activity.
Author:
Laird Nelson
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    created(I instance)
    Signals that the supplied instance has been created, typically by an invocation of a Factory's create(Request) method, and is about to be made available for use.
  • Method Details

    • created

      void created(I instance)
      Signals that the supplied instance has been created, typically by an invocation of a Factory's create(Request) method, and is about to be made available for use.

      This method is typically invoked from within a Factory.create(Request) implementation immediately prior to its returning a value.

      It is permissible for an implementation of this method to do nothing.

      Parameters:
      instance - the instance that was created; must not be null
      Throws:
      NullPointerException - if instance was null and the implementation does not support null arguments
      IllegalArgumentException - if instance was found to be unsuitable for any reason
      Idempotency:
      Implementations of this method must be idempotent.
      Thread Safety:
      Implementations of this method must be safe for concurrent use by multiple threads.