org.springframework.beans.factory.serviceloader

Class AbstractServiceLoaderBasedFactoryBean

    • Constructor Detail

      • AbstractServiceLoaderBasedFactoryBean

        public AbstractServiceLoaderBasedFactoryBean()
    • Method Detail

      • setServiceType

        public void setServiceType(@Nullable
                                   java.lang.Class<?> serviceType)
        Specify the desired service type (typically the service's public API).
      • getServiceType

        @Nullable
        public java.lang.Class<?> getServiceType()
        Return the desired service type.
      • getObjectToExpose

        protected abstract java.lang.Object getObjectToExpose(java.util.ServiceLoader<?> serviceLoader)
        Determine the actual object to expose for the given ServiceLoader.

        Left to concrete subclasses.

        Parameters:
        serviceLoader - the ServiceLoader for the configured service class
        Returns:
        the object to expose