/** * Create a default builder */ public ServiceRegistryBuilder() { this( new BootstrapServiceRegistryImpl() ); }
@Override public <R extends Service> R getService(Class<R> serviceRole) { final ServiceBinding<R> binding = locateServiceBinding( serviceRole ); return binding == null ? null : binding.getService(); }
@Override public <R extends Service> R getService(Class<R> serviceRole) { final ServiceBinding<R> binding = locateServiceBinding( serviceRole ); return binding == null ? null : binding.getService(); }
/** * Create a default builder */ public ServiceRegistryBuilder() { this( new BootstrapServiceRegistryImpl() ); }
/** * Build the bootstrap registry. * * @return The built bootstrap registry */ public BootstrapServiceRegistry build() { final ClassLoaderServiceImpl classLoaderService = new ClassLoaderServiceImpl( applicationClassLoader, resourcesClassLoader, hibernateClassLoader, environmentClassLoader ); final IntegratorServiceImpl integratorService = new IntegratorServiceImpl( providedIntegrators, classLoaderService ); return new BootstrapServiceRegistryImpl( classLoaderService, integratorService ); } }
/** * Build the bootstrap registry. * * @return The built bootstrap registry */ public BootstrapServiceRegistry build() { final ClassLoaderServiceImpl classLoaderService = new ClassLoaderServiceImpl( applicationClassLoader, resourcesClassLoader, hibernateClassLoader, environmentClassLoader ); final IntegratorServiceImpl integratorService = new IntegratorServiceImpl( providedIntegrators, classLoaderService ); return new BootstrapServiceRegistryImpl( classLoaderService, integratorService ); } }