Package org.apache.hivemind.service

Examples of org.apache.hivemind.service.BodyBuilder.begin()


        builder.begin();

        builder.addln("boolean first = true;");
        builder.add("while (true)");
        builder.begin();

        builder.add("try");
        builder.begin();

        if (!isVoid)
View Full Code Here


        builder.addln("boolean first = true;");
        builder.add("while (true)");
        builder.begin();

        builder.add("try");
        builder.begin();

        if (!isVoid)
            builder.add("return ");

        builder.add("_lookupRemote().");
View Full Code Here

            builder.addln("return;");

        builder.end(); // try

        builder.add("catch (java.rmi.RemoteException ex)");
        builder.begin();

        builder.addln("if (first)");
        builder.begin();

        builder.addln("_handleRemoteException(ex);");
View Full Code Here

        builder.add("catch (java.rmi.RemoteException ex)");
        builder.begin();

        builder.addln("if (first)");
        builder.begin();

        builder.addln("_handleRemoteException(ex);");
        builder.addln("first = false;");

        builder.end(); // if
View Full Code Here

            Method m = methods[j];
            String methodName = m.getName();

            builder.clear();

            builder.begin();

            if (names.contains(methodName))
            {
                builder.add("_logEntry(");
                builder.addQuoted(methodName);
View Full Code Here

    protected void addServiceMethodImplementation(ClassFab classFab, MethodSignature sig)
    {
        BodyBuilder builder = new BodyBuilder();

        builder.begin();
        builder.addln("hivemind.test.services.impl.CountFactory#incrementCount();");

        builder.add("return ($r) _inner.");
        builder.add(sig.getName());
        builder.add("($$);");
View Full Code Here

     * methods that are not logged.
     */
    private void addPassThruMethodImplementation(ClassFab classFab, MethodSignature sig)
    {
        BodyBuilder builder = new BodyBuilder();
        builder.begin();

        builder.add("return ($r) _inner.");
        builder.add(sig.getName());
        builder.addln("($$);");

View Full Code Here

        boolean isVoid = (returnType == void.class);

        BodyBuilder builder = new BodyBuilder();

        builder.begin();
        builder.addln("boolean debug = _log.isDebugEnabled();");

        builder.addln("if (debug)");
        builder.add("  org.apache.hivemind.service.impl.LoggingUtils.entry(_log, ");
        builder.addQuoted(methodName);
View Full Code Here

        MethodFab methodFab = classFab.addMethod(Modifier.PUBLIC, sig, builder.toString());

        builder.clear();

        builder.begin();
        builder.add("org.apache.hivemind.service.impl.LoggingUtils.exception(_log, ");
        builder.addQuoted(methodName);
        builder.addln(", $e);");
        builder.addln("throw $e;");
        builder.end();
View Full Code Here

    {
        String homeInterfaceName = homeInterface.getName();

        BodyBuilder builder = new BodyBuilder();

        builder.begin();

        builder.addln("if (_remote != null)");
        builder.addln("  return _remote;");

        builder.add(homeInterfaceName);
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.