Interface ServiceRegistryImplementor

All Superinterfaces:
AutoCloseable, ServiceRegistry
All Known Subinterfaces:
SessionFactoryServiceRegistry

public interface ServiceRegistryImplementor extends ServiceRegistry
Additional integration contracts for a service registry.
  • Method Details

    • locateServiceBinding

      @Nullable <R extends Service> ServiceBinding<R> locateServiceBinding(@Nonnull Class<R> serviceRole)
      Locate the binding for the given role. Should, generally speaking, look into parent registry if one.
      Type Parameters:
      R - generic return type.
      Parameters:
      serviceRole - The service role for which to locate a binding.
      Returns:
      The located binding; may be null
    • close

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

      boolean isActive()
    • destroy

      void destroy()
      Release resources
    • registerChild

      void registerChild(@Nonnull ServiceRegistryImplementor child)
      When a registry is created with a parent, the parent is notified of the child via this callback.
    • deRegisterChild

      void deRegisterChild(@Nonnull ServiceRegistryImplementor child)
      When a registry is created with a parent, the parent is notified of the child via this callback.
    • fromRegistryOrChildren

      @Nullable <T extends Service> T fromRegistryOrChildren(@Nonnull Class<T> serviceRole)