Package org.apache.hivemind.service

Examples of org.apache.hivemind.service.MethodSignature


        classFab.addField("_inner", serviceInterface);
        classFab.addField("_shutdown", boolean.class);

        classFab.addInterface(RegistryShutdownListener.class);

        classFab.addMethod(Modifier.PUBLIC | Modifier.FINAL, new MethodSignature(void.class,
                "registryDidShutdown", null, null), "{ _shutdown = true; }");

        classFab.addMethod(
                Modifier.PUBLIC | Modifier.SYNCHRONIZED | Modifier.FINAL,
                new MethodSignature(void.class, "_setInner", new Class[]
                { serviceInterface }, null),
                "{ _inner = $1; }");

        BodyBuilder builder = new BodyBuilder();
        builder.begin();
        builder.addln("if (_shutdown)");
        builder.begin();
        builder.addln("_inner = null;");
        builder.addln("throw org.apache.hivemind.HiveMind#createRegistryShutdownException();");
        builder.end();

        builder.addln("return _inner;");
        builder.end();

        classFab.addMethod(Modifier.PRIVATE, new MethodSignature(serviceInterface, "_getInner",
                null, null), builder.toString());

        proxyBuilder.addServiceMethods("_getInner()");

        return classFab.createClass();
View Full Code Here


        body.end();

        classFab.addMethod(
                Modifier.PRIVATE | Modifier.FINAL | Modifier.SYNCHRONIZED,
                new MethodSignature(serviceInterface, "_service", null, null),
                body.toString());

        builder.addServiceMethods("_service()");

        // Build the implementation of interface SingletonInnerProxy

        body.clear();
        body.begin();

        body.add("_service();");

        body.end();

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

        classFab.addInterface(SingletonInnerProxy.class);

        return classFab.createClass();
View Full Code Here

     */
    protected void initCounters()
    {
        for (Iterator methodIterator = _methods.iterator(); methodIterator.hasNext();)
        {
            MethodSignature method = (MethodSignature) methodIterator.next();
            Counter counter = new Counter();
            _countersByMethodSignature.put(method, counter);
            _countersByMethodId.put(method.getUniqueId(), counter);
        }
    }
View Full Code Here

    protected void initAttributes()
    {
        List mBeanAttributeInfoList = new ArrayList();
        for (Iterator methodIterator = _methods.iterator(); methodIterator.hasNext();)
        {
            MethodSignature method = (MethodSignature) methodIterator.next();

            addAttribute(
                    mBeanAttributeInfoList,
                    method,
                    Long.class,
View Full Code Here

    private void addClearCachedMethod(ClassFab classFab)
    {
        classFab.addMethod(
            Modifier.PROTECTED,
            new MethodSignature(void.class, "_clearCachedReferences", null, null),
            "_remote = null;");
    }
View Full Code Here

        builder.end();

        classFab.addMethod(
            Modifier.SYNCHRONIZED + Modifier.PRIVATE,
            new MethodSignature(
                remoteInterface,
                "_lookupRemote",
                null,
                new Class[] { RemoteException.class }),
            builder.toString());
View Full Code Here

        builder.add("  throw ex;");
        builder.end(); // catch
        builder.end(); // while
        builder.end();

        classFab.addMethod(Modifier.PUBLIC, new MethodSignature(m), builder.toString());
    }
View Full Code Here

            body.append(";");
        }

        body.append(" }");

        cf.addMethod(Modifier.PUBLIC, new MethodSignature(m), body.toString());
    }
View Full Code Here

        {
            Method m = methods[i];

            toStringMethodExists |= ClassFabUtils.isToString(m);

            serviceMethods.add(new MethodSignature(m));
        }

        methods = _filterInterface.getMethods();
        for (int i = 0; i < methods.length; i++)
        {
            Method m = methods[i];

            filterMethods.add(new MethodSignature(m));
        }

        while (!serviceMethods.isEmpty())
        {
            MethodSignature ms = (MethodSignature) serviceMethods.remove(0);

            addBridgeMethod(ms, filterMethods);
        }

        reportExtraFilterMethods(filterMethods);
View Full Code Here

    {
        Iterator i = filterMethods.iterator();

        while (i.hasNext())
        {
            MethodSignature ms = (MethodSignature) i.next();

            _log.error(
                PipelineMessages.extraFilterMethod(
                    ms,
                    _filterInterface,
View Full Code Here

TOP

Related Classes of org.apache.hivemind.service.MethodSignature

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.