Package org.apache.hivemind.service

Examples of org.apache.hivemind.service.ClassFab.createClass()


        addServiceAccessor(classFab, delegationMethodName, servicePoint);

        builder.addServiceMethods(SERVICE_ACCESSOR_METHOD_NAME + "()");

        Class proxyClass = classFab.createClass();

        try
        {
            Constructor c = proxyClass.getConstructor(new Class[]
            { String.class, serviceModel.getClass() });
View Full Code Here


        addDelegateAccessor(classFab, servicePoint, delegate);

        builder.addServiceMethods(DELEGATE_ACCESSOR_METHOD_NAME + "()");

        Class proxyClass = classFab.createClass();

        try
        {
            return (RegistryShutdownListener) ConstructorUtils.invokeConstructor(
                    proxyClass,
View Full Code Here

        classFab.addMethod(Modifier.PUBLIC | Modifier.FINAL, new MethodSignature(void.class,
                "_instantiateServiceImplementation", null, null), body.toString());

        classFab.addInterface(SingletonInnerProxy.class);

        return classFab.createClass();
    }

    public void instantiateService()
    {
        // Ensure that the outer and inner proxies have been created
View Full Code Here

        cf.addConstructor(new Class[]
        { String.class, serviceType }, null, "{ this($1); _service = $2; }");

        builder.addServiceMethods("_service");

        return cf.createClass();
    }

    /**
     * Invoked after creating a service implementation object; if the object implements
     * {@link org.apache.hivemind.events.RegistryShutdownListener}, then the object is added as a
View Full Code Here

        addServiceMethods(classFab, serviceInterface, serviceId, jndiName);

        addConstructor(classFab);

        Class proxyClass = classFab.createClass();

        return invokeConstructor(proxyClass, proxyParameters.getNameLookup(_nameLookup));
    }

    private void addClearCachedMethod(ClassFab classFab)
View Full Code Here

        addInfrastructure(cf, targetService, serviceInterface, propertyName, readMethodName);

        addMethods(cf, serviceId, serviceInterface, propertyName, targetService);

        Class proxyClass = cf.createClass();

        try
        {
            return ConstructorUtils.invokeConstructor(proxyClass, new Object[] { targetService });
        }
View Full Code Here

        if (!mi.getToString())
            ClassFabUtils.addToStringMethod(cf, ImplMessages
                    .defaultImplementationDescription(interfaceType));

        return cf.createClass();
    }

    public void setClassFactory(ClassFactory factory)
    {
        _classFactory = factory;
View Full Code Here

                factoryParameters.getServiceId(),
                serviceInterface,
                propertyName,
                targetService);

        Class proxyClass = cf.createClass();

        try
        {
            return ConstructorUtils.invokeConstructor(proxyClass, new Object[]
            { targetService });
View Full Code Here

        addInfrastructure(cf, commandInterface);

        addMethods(cf, commandInterface);

        return cf.createClass();
    }

    void addInfrastructure(ClassFab cf, Class commandInterface)
    {
        Class array = _classResolver.findClass(commandInterface.getName() + "[]");
View Full Code Here

        if (!i.getToString())
            ClassFabUtils.addToStringMethod(cf, StrategyMessages.toString(factoryParameters
                    .getServiceId(), serviceInterface));

        return cf.createClass();
    }

    private void addAdaptedMethod(ClassFab cf, MethodSignature sig)
    {
        String body = "return ($r) _getStrategy($1)." + sig.getName() + "($$);";
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.