Examples of ServiceLocator


Examples of org.glassfish.hk2.api.ServiceLocator

        }
        return sb.toString();
    }

    public static Map<String, String> getCurrentValues(String basePath, Subject subject) {
        ServiceLocator serviceLocator = Globals.getDefaultBaseServiceLocator();
        return getCurrentValues(basePath, serviceLocator, subject);
    }
View Full Code Here

Examples of org.glassfish.hk2.api.ServiceLocator

    /**
     * Given a command name, return the name of the class that implements
     * that command in the server.
     */
    private static String getCommandClass(String cmdName) {
        ServiceLocator h = getManHabitat();
        String cname = "org.glassfish.api.admin.AdminCommand";
        for (ActiveDescriptor<?> ad : h.getDescriptors(BuilderHelper.createContractFilter(cname))) {
            if (ad.getName() != null && ad.getName().equals(cmdName)) {
                return ad.getImplementation();
            }
        }
       
View Full Code Here

Examples of org.glassfish.hk2.api.ServiceLocator

    private static synchronized ServiceLocator getManHabitat() {
        if (manServiceLocator != null)
            return manServiceLocator;
       
        ModulesRegistry registry = new StaticModulesRegistry(getModuleClassLoader());
        ServiceLocator serviceLocator = registry.createServiceLocator("default");
        manServiceLocator = serviceLocator;
        return manServiceLocator;
    }
View Full Code Here

Examples of org.glassfish.hk2.api.ServiceLocator

            final StartupContext startupContext = new StartupContext(gfProps.getProperties());
           
            ModulesRegistry modulesRegistry = SingleHK2Factory.getInstance().createModulesRegistry();

            ServiceLocator serviceLocator = main.createServiceLocator(modulesRegistry, startupContext, Arrays.asList((PopulatorPostProcessor)new EmbeddedInhabitantsParser(), new ContextDuplicatePostProcessor()), null);

            final ModuleStartup gfKernel = main.findStartupService(modulesRegistry, serviceLocator, null, startupContext);
            // create a new GlassFish instance
            GlassFishImpl gfImpl = new GlassFishImpl(gfKernel, serviceLocator, gfProps.getProperties()) {
                @Override
View Full Code Here

Examples of org.gradle.internal.service.ServiceLocator

    public FilteringClassLoader createFilteringClassLoader(ClassLoader parent) {
        // See the comment for {@link #createIsolatedClassLoader} above
        FilteringClassLoader classLoader = new FilteringClassLoader(parent);
        if (needJaxpImpl()) {
            ServiceLocator locator = new ServiceLocator(ClassLoader.getSystemClassLoader());
            makeServiceVisible(locator, classLoader, SAXParserFactory.class);
            makeServiceVisible(locator, classLoader, DocumentBuilderFactory.class);
            makeServiceVisible(locator, classLoader, DatatypeFactory.class);
        }
        return classLoader;
View Full Code Here

Examples of org.sonatype.aether.spi.locator.ServiceLocator

    extends TestCase
{

    public void testGetRepositorySystem()
    {
        ServiceLocator locator = new MavenServiceLocator();
        RepositorySystem repoSys = locator.getService( RepositorySystem.class );
        assertNotNull( repoSys );
    }
View Full Code Here

Examples of org.sonatype.aether.spi.locator.ServiceLocator

        assertNotNull( repoSys );
    }

    public void testGetMetadataGeneratorFactories()
    {
        ServiceLocator locator = new MavenServiceLocator();
        assertEquals( 2, locator.getServices( MetadataGeneratorFactory.class ).size() );
    }
View Full Code Here

Examples of org.talend.esb.servicelocator.client.ServiceLocator

        replay(conduitSelector);
    }

    @Test
    public void enableClient() {
        ServiceLocator sl = createMock(ServiceLocator.class);

        Capture<LocatorTargetSelector> capturedSelector = new Capture<LocatorTargetSelector>();

        Client client = createMock(Client.class);
        expect(client.getConduitSelector()).andStubReturn(conduitSelector);
View Full Code Here

Examples of org.zanata.util.ServiceLocator

            extends AbstractListFilter<HProject> {

        @Override
        protected List<HProject> fetchRecords(int start, int max,
                String filter) {
            ServiceLocator serviceLocator = ServiceLocator.instance();
            ProjectDAO projectDAO =
                    serviceLocator.getInstance(ProjectDAO.class);
            HAccount authenticatedAccount =
                    serviceLocator
                            .getInstance(JpaIdentityStore.AUTHENTICATED_USER,
                                    HAccount.class);
            return projectDAO.getProjectsForMaintainer(
                    authenticatedAccount.getPerson(), filter, start, max);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.