Package org.apache.hivemind.annotations

Examples of org.apache.hivemind.annotations.TypedRegistry


    {
        double arg0 = Double.parseDouble(args[0]);
        double arg1 = Double.parseDouble(args[1]);

        AnnotatedRegistryBuilder builder = new AnnotatedRegistryBuilder();
        TypedRegistry registry = builder.constructRegistry(CalculatorModule.class);
       
        Calculator calculator = registry.getService(Calculator.class);

        System.out.println("Inputs:   " + arg0 + " and " + arg1);
        System.out.println("Add:      " + calculator.add(arg0, arg1));
        System.out.println("Subtract: " + calculator.subtract(arg0, arg1));
        System.out.println("Multiply: " + calculator.multiply(arg0, arg1));
        System.out.println("Divide:   " + calculator.divide(arg0, arg1));


        registry.shutdown();
    }
View Full Code Here


{

    public static void main(String[] args)
    {
        AnnotatedRegistryBuilder builder = new AnnotatedRegistryBuilder();
        TypedRegistry registry = builder.constructRegistry(PanoramaModule.class);

        registry.shutdown();
    }
View Full Code Here

    {
        if (PropertyUtils.isWritable(moduleInstance, REGISTRY_PROPERTY_NAME)
                && PropertyUtils.getPropertyType(moduleInstance, REGISTRY_PROPERTY_NAME).equals(TypedRegistry.class)) {
           
            Module callingModule = _registry.getModule(_moduleId);
            TypedRegistry annotatedRegistry = new TypedRegistryImpl(callingModule, _registry);
            PropertyUtils.write(moduleInstance, REGISTRY_PROPERTY_NAME, annotatedRegistry);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.annotations.TypedRegistry

Copyright © 2018 www.massapicom. 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.