Interface Instances

All Superinterfaces:
AutoCloseable, InstanceRemover

public interface Instances extends AutoCloseable, InstanceRemover
A factory for Suppliers of contextual instances.
Author:
Laird Nelson
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
     
    boolean
    proxiable(Request<?> request)
    Returns true if and only if the supplied Request should result in a contextual reference that is a client proxy.
    <I> Supplier<? extends I>
    supplier(Request<I> request)
    Returns a Supplier of contextual instances appropriate for the given Request.

    Methods inherited from interface org.microbean.reference.InstanceRemover

    remove
  • Method Details

    • close

      default void close()
      Specified by:
      close in interface AutoCloseable
    • proxiable

      boolean proxiable(Request<?> request)
      Returns true if and only if the supplied Request should result in a contextual reference that is a client proxy.
      Parameters:
      request - a Request; may be null
      Returns:
      true if and only if the supplied Request should result in a contextual reference that is a client proxy
    • supplier

      <I> Supplier<? extends I> supplier(Request<I> request)
      Returns a Supplier of contextual instances appropriate for the given Request.
      Type Parameters:
      I - the type of the contextual instance being requested
      Parameters:
      request - a Request; may be null
      Returns:
      a non-null Supplier of contextual instances of the appropriate type