Used both in the program's main method and in testing to send a request to an actor and wait for a response.
Factorial factorial = new Factorial(mailboxFactory.createMailbox()); JAFuture future = new JAFuture(); future.send(factorial, null);
1314151617181920212223
public class ActorJidTest extends TestCase { public void test() { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); try { JAFuture future = new JAFuture(); JidFactories factory = new JidFactories(); factory.initialize(mailboxFactory.createMailbox()); ActorJidFactory actorJidAFactory = new ActorJidFactory(); Actor jidJid1 = actorJidAFactory.newActor(factory.getMailbox(), factory);
public class RootJidTest extends TestCase { public void test() { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); try { JAFuture future = new JAFuture(); JidFactories factory = new JidFactories(); factory.initialize(mailboxFactory.createMailbox()); RootJidFactory rootJidFactory = new RootJidFactory(); Actor rootJid1 = rootJidFactory.newActor(factory.getMailbox(), factory);
1213141516171819202122
public class UnionJidTest extends TestCase { public void test() { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); try { JAFuture future = new JAFuture(); Mailbox mailbox = mailboxFactory.createMailbox(); JAFactory factory = new JAFactory(); factory.initialize(mailbox); (new JidFactories()).initialize(mailbox, factory); UnionJidFactory siuf =
1415161718192021222324
public class BooleanTest extends TestCase { public void test() { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); try { JAFuture future = new JAFuture(); JidFactories factory = new JidFactories(); factory.initialize(mailboxFactory.createMailbox()); BooleanJid boolean1 = (BooleanJid) BooleanJidFactory.fac.newActor(factory.getMailbox(), factory); BooleanJid boolean2 = (BooleanJid) (new CopyJID()).send(future, boolean1);
public class BigBooleanListTest extends TestCase { public void test1() throws Exception { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); Mailbox mailbox = mailboxFactory.createMailbox(); JAFuture future = new JAFuture(); JidFactories factory = new JidFactories(); factory.initialize(mailboxFactory.createMailbox()); RootJid root = new RootJid();
3940414243444546474849
} public void test2() throws Exception { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); Mailbox mailbox = mailboxFactory.createMailbox(); JAFuture future = new JAFuture(); JidFactories factory = new JidFactories(); factory.initialize(mailboxFactory.createMailbox()); RootJid root = new RootJid();
7879808182838485868788
} public void test3() throws Exception { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); Mailbox mailbox = mailboxFactory.createMailbox(); JAFuture future = new JAFuture(); JidFactories factory = new JidFactories(); factory.initialize(mailboxFactory.createMailbox()); RootJid root = new RootJid();
119120121122123124125126127128129
} public void test4() throws Exception { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); Mailbox mailbox = mailboxFactory.createMailbox(); JAFuture future = new JAFuture(); JidFactories factory = new JidFactories(); factory.initialize(mailboxFactory.createMailbox()); RootJid root = new RootJid();
160161162163164165166167168169170
} public void test5() throws Exception { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); Mailbox mailbox = mailboxFactory.createMailbox(); JAFuture future = new JAFuture(); JidFactories factory = new JidFactories(); factory.initialize(mailboxFactory.createMailbox()); RootJid root = new RootJid();
1516171819202122232425
public class StringTest extends TestCase { public void test() { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); try { JAFuture future = new JAFuture(); JidFactories factory = new JidFactories(); factory.initialize(mailboxFactory.createMailbox()); StringJid string1 = (StringJid) StringJidFactory.fac.newActor(factory.getMailbox(), factory); StringJid string2 = (StringJid) (new CopyJID()).send(future, string1);