Examples of RP


Examples of org.agilewiki.jactor.RP

                System.out.println("* " + request.getValue() + " => "
                        + exception);
                rp.processResponse(null);
            }
        });
        send(calculator, request, new RP() {
            @Override
            public void processResponse(final Object response) throws Exception {
                System.out.println("* " + request.getValue() + " => "
                        + response);
                rp.processResponse(response);
View Full Code Here

Examples of org.agilewiki.jactor.RP

                System.out.println("/ " + request.getValue() + " => "
                        + exception);
                rp.processResponse(null);
            }
        });
        send(calculator, request, new RP() {
            @Override
            public void processResponse(final Object response) throws Exception {
                System.out.println("/ " + request.getValue() + " => "
                        + response);
                rp.processResponse(response);
View Full Code Here

Examples of org.agilewiki.jactor.RP

            @Override
            public void process(final RP rd2) throws Exception {
                if (i > count) rd2.processResponse(this);
                else {
                    i += 1;
                    RP rd3 = new RP() {
                        int r = burst;

                        @Override
                        public void processResponse(Object unwrappedResponse) throws Exception {
                            r -= 1;
                            if (r == 0) rd2.processResponse(null);
                        }
                    };
                    int j = 0;
                    while (j < burst) {
                        rd3.processResponse(null);
                        j += 1;
                    }
                }
            }
        }).iterate(rd1);
View Full Code Here

Examples of org.agilewiki.jactor.RP

            @Override
            public void process(final RP rd2) throws Exception {
                if (i > count) rd2.processResponse(this);
                else {
                    i += 1;
                    RP rd3 = new RP() {
                        int r = burst;

                        @Override
                        public void processResponse(Object unwrappedResponse) throws Exception {
                            r -= 1;
View Full Code Here

Examples of org.agilewiki.jactor.RP

        //System.out.println("####################################################");
        //final long c = 1000000000L;
        //iterations per sec = 544,662,309

        final long t0 = System.currentTimeMillis();
        RP done = new RP() {
            @Override
            public void processResponse(Object unwrappedResponse) throws Exception {
                final long t1 = System.currentTimeMillis();
                long d = t1 - t0;
                if (d > 0) System.out.println("iterations per sec = " + c * 1000L / d);
View Full Code Here

Examples of org.agilewiki.jactor.RP

* Test code.
*/
public class SimpleFactorialTest extends TestCase {
    public void testFactorial() throws Exception {
        final int max = 5;
        RP printResult = new RP() {
            public void processResponse(Object rsp) {
                System.out.println(rsp);
            }
        };

View Full Code Here

Examples of org.agilewiki.jactor.RP

public class Driver1 extends JLPCActor implements SimpleRequestReceiver {
    @Override
    public void processRequest(SimpleRequest request, final RP rp) throws Exception {
        final Calculator calculator = new Calculator();
        calculator.initialize(getMailbox());
        send(calculator, new Set(1), new RP() {
            @Override
            public void processResponse(Object response) throws Exception {
                (new Add(2)).send(Driver1.this, calculator, new RP() {
                    @Override
                    public void processResponse(Object response) throws Exception {
                        (new Multiply(3)).send(Driver1.this, calculator, rp);
                    }
                });
View Full Code Here

Examples of org.agilewiki.jactor.RP

/**
* Test code.
*/
public class ResponsePrinter extends JLPCActor {
    public void printResponse(Request wrappedRequest, Actor actor, final RP rp) throws Exception {
        wrappedRequest.send(this, actor, new RP() {
            @Override
            public void processResponse(Object response) throws Exception {
                System.out.println(response);
                rp.processResponse(null);
            }
View Full Code Here

Examples of org.agilewiki.jactor.RP

                            addCount.number = 100L;
                            addCount.send(Driver.this, counterActor, rp1);
                        }
                    }
                };
                it.iterate(new RP() {
                    @Override
                    public void processResponse(Object response) throws Exception {
                        rp1.processResponse(null);
                    }
                });
View Full Code Here

Examples of org.agilewiki.jactor.RP

        //final long c = 1000000000L;
        //iterations per sec = 2,142,245,507

        final long t0 = System.currentTimeMillis();

        final RP done = new RP() {
            @Override
            public void processResponse(Object unwrappedResponse) throws Exception {
                final long t1 = System.currentTimeMillis();
                long d = t1 - t0;
                if (d > 0) System.out.println("iterations per sec = " + c * 1000L / d);
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.