Package org.apache.hivemind.service

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


                "{ _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;");
View Full Code Here


        BodyBuilder body = new BodyBuilder();

        // The constructor remembers the outer proxy and registers itself
        // with the outer proxy.

        body.begin();

        body.addln("this($1);");
        body.addln("_deferredProxy = $2;");
        body.addln("_serviceModel = $3;");
        body.addln("_deferredProxy._setInner(this);");
View Full Code Here

        // Method _service() will look up the service implementation,
        // then update the deferred proxy to go directly to the
        // service implementation, bypassing itself!

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

        body.add("if (_service == null)");
        body.begin();

        body.add("_service = (");
View Full Code Here

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

        body.add("if (_service == null)");
        body.begin();

        body.add("_service = (");
        body.add(serviceInterface.getName());
        body.addln(") _serviceModel.getActualServiceImplementation();");
View Full Code Here

        builder.addServiceMethods("_service()");

        // Build the implementation of interface SingletonInnerProxy

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

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

        body.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

        builder.add(") _lookup(");
        builder.addQuoted(jndiName);
        builder.addln(");");

        builder.add("try");
        builder.begin();
        builder.add("_remote = home.create();");
        builder.end();
        builder.add("catch (javax.ejb.CreateException ex)");
        builder.begin();
        builder.add("throw new java.rmi.RemoteException(ex.getMessage(), ex);");
View Full Code Here

        builder.add("try");
        builder.begin();
        builder.add("_remote = home.create();");
        builder.end();
        builder.add("catch (javax.ejb.CreateException ex)");
        builder.begin();
        builder.add("throw new java.rmi.RemoteException(ex.getMessage(), ex);");
        builder.end();

        builder.add("return _remote;");
View Full Code Here

        boolean isVoid = sig.getReturnType().equals(Void.TYPE);

        BodyBuilder builder = new BodyBuilder();

        builder.begin();

        builder.addln("boolean first = true;");
        builder.add("while (true)");
        builder.begin();
View Full Code Here

        builder.begin();

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

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

        if (!isVoid)
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.