Examples of DefaultClassResolver


Examples of org.apache.hivemind.impl.DefaultClassResolver

        module.getModuleId();
        moduleControl.setReturnValue("foo.bar");

        module.getClassResolver();
        moduleControl.setReturnValue(new DefaultClassResolver());

        PipelineFactory factory = new PipelineFactory();
        factory.setClassFactory(cf);
        factory.setDefaultImplementationBuilder(dib);
        factory.setErrorHandler(getErrorHandler());
View Full Code Here

Examples of org.apache.hivemind.impl.DefaultClassResolver

    /**
     * Constructor that uses default implementations of ClassResolver, ErrorHandler and Locale.
     */
    public AnnotatedRegistryBuilder()
    {
        this(new DefaultClassResolver(), new DefaultErrorHandler(), Locale.getDefault());
    }
View Full Code Here

Examples of org.apache.hivemind.impl.DefaultClassResolver

    /**
     * @param registryDefinition  the registry definition to which the modules are added.
     */
    public AnnotatedModuleReader(RegistryDefinition registryDefinition)
    {
        this(registryDefinition, new DefaultClassResolver(), new DefaultErrorHandler());
    }
View Full Code Here

Examples of org.apache.hivemind.impl.DefaultClassResolver

*/
public class SimpleModule extends ModuleDefinitionImpl
{
    public SimpleModule()
    {
        super("hivemind.test.services", createLocation(), new DefaultClassResolver(), null);
       
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(this);
        ServicePointDefinition sp = helper.addServicePoint("Simple", SimpleService.class.getName());
        helper.addSimpleServiceImplementation(sp, SimpleServiceImpl.class.getName(), ServiceModel.SINGLETON);
    }
View Full Code Here

Examples of org.apache.hivemind.impl.DefaultClassResolver

   
    private static Location createLocation()
    {
        String path = "/" + SimpleModule.class.getName().replace('.', '/');

        Resource r = new ClasspathResource(new DefaultClassResolver(), path);

        return new LocationImpl(r, 1);
    }
View Full Code Here

Examples of org.apache.hivemind.impl.DefaultClassResolver

*/
public class StringHolderModule extends ModuleDefinitionImpl
{
    public StringHolderModule(String serviceModel)
    {
        super("hivemind.test.services", null, new DefaultClassResolver(), null);
       
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(this);
        ServicePointDefinition sp = helper.addServicePoint("StringHolder", StringHolder.class.getName());
        helper.addSimpleServiceImplementation(sp, StringHolderImpl.class.getName(), serviceModel);
       
View Full Code Here

Examples of org.apache.hivemind.impl.DefaultClassResolver

        result.getModuleId();
        c.setReturnValue("test.module");

        result.getClassResolver();
        c.setReturnValue(new DefaultClassResolver());

        return result;
    }
View Full Code Here

Examples of org.apache.hivemind.impl.DefaultClassResolver

        // here that aren't necessary in an ordinary HiveMind application.

        String projectRoot = System.getProperty("PROJECT_ROOT", ".");
        String path = projectRoot + "/examples/src/descriptor/META-INF/" + fileName;

        ClassResolver resolver = new DefaultClassResolver();

        // Register the examples.xml file, which (given its non-standard name)
        // is not visible.
        ModuleDescriptorProvider provider = new XmlModuleDescriptorProvider(resolver,
                new FileResource(path));
View Full Code Here

Examples of org.apache.hivemind.impl.DefaultClassResolver

    /**
     * Builds a registry for files in the classpath.
     */
    public static Registry buildClasspathRegistry(String[] files) throws Exception
    {
        ClassResolver resolver = new DefaultClassResolver();

        List descriptorResources = new ArrayList();
        for (int i = 0; i < files.length; i++)
        {
            Resource resource = getResource(files[i]);
View Full Code Here

Examples of org.apache.hivemind.impl.DefaultClassResolver

        return buildRegistry(provider);
    }
   
    protected static Registry buildRegistry(ModuleDescriptorProvider customProvider)
    {
        ClassResolver resolver = new DefaultClassResolver();

        RegistryBuilder builder = new RegistryBuilder();

        builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(resolver));
        builder.addModuleDescriptorProvider(customProvider);
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.