}
}
public void test4() {
System.out.println("start ResponsePrinterTest 4");
JAMailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(10);
try {
Greeter a = new Greeter();
a.initialize(mailboxFactory.createMailbox());
int count = 5;
ResponsePrinter[] bs = new ResponsePrinter[count];
int i = 0;
while (i < count) {
ResponsePrinter b = new ResponsePrinter();
b.initialize(mailboxFactory.createAsyncMailbox());
bs[i] = b;
i += 1;
}
ParallelResponsePrinter c = new ParallelResponsePrinter();
c.initialize(mailboxFactory.createMailbox());
JAFuture future = new JAFuture();
PrintResponse printResponse = new PrintResponse(new Hi(), a);
PrintParallelResponse printParallelResponse = new PrintParallelResponse(count, bs, printResponse);
printParallelResponse.send(future, c);
} catch (Throwable e) {
e.printStackTrace();
} finally {
System.out.println("end ResponsePrinterTest 4");
mailboxFactory.close();
}
}