Interface SingletonFactory<Input,Output>

Type Parameters:
Input - the factory input class type
Output - the factory output class type
All Known Implementing Classes:
AbstractSimpleSingletonFactory, AbstractSingletonFactory, AbstractWrappedSingletonFactory

public interface SingletonFactory<Input,Output>
An interface for factory classes which implement a singleton pattern for producing an output class based on an input class.

Classes which implement this interface should ensure that exactly one instance of a given output class is returned from the factory for a given instance of an input class.

  • Method Summary

    Modifier and Type
    Method
    Description
    Obtain an instance of the output class based on an input class instance.
  • Method Details

    • getInstance

      Output getInstance(Input input)
      Obtain an instance of the output class based on an input class instance.
      Parameters:
      input - the input class instance
      Returns:
      an output class instance