Examples of MailboxPullRegistration


Examples of net.jini.event.MailboxPullRegistration

  Object admin = getMailboxAdmin(mb);
        DestroyAdmin dAdmin = (DestroyAdmin)admin;
        int i = 0;

  // Register and check lease
  MailboxPullRegistration mr = getPullRegistration(mb, DURATION1);
  Lease mrl = getPullMailboxLease(mr);
  checkLease(mrl, DURATION1);

        // Start event generator thread with a delay of MAX_WAIT_SEND_EVENT
        Thread t =
            new Thread(
                new MyDestroyerRunnable(
                    dAdmin, logger, MAX_WAIT_SEND_DESTROY ));
        t.start();
       
        // Get events and verify
  logger.log(Level.INFO, "Getting events from empty mailbox.");
        RemoteEventIterator rei = mr.getRemoteEvents();
        RemoteEvent rei_event = null;
        Date before = new Date();
  logger.log(Level.INFO, "Calling next() on empty set @ {0}", before);       
        try {
            rei_event = rei.next(MAX_WAIT_GET_EVENT);
View Full Code Here

Examples of net.jini.event.MailboxPullRegistration

      EventMailbox mb = getMailbox();
      MailboxRegistration mr = getRegistration(mb, DURATION);
      mrl = getMailboxLease(mr);
  } else if (mbType.equals(PULL_MAILBOX_IF_NAME)) {
            PullEventMailbox mb = getPullMailbox();
      MailboxPullRegistration mr = getPullRegistration(mb, DURATION);
      mrl = getPullMailboxLease(mr);
  } else {
            throw new TestException(
    "Unsupported mailbox type requested" + mbType);
  }
View Full Code Here

Examples of net.jini.event.MailboxPullRegistration

    public void run() throws Exception {
  int i = 0;
  PullEventMailbox mb = getPullMailbox();       

  // Register and check lease
  MailboxPullRegistration mr = getPullRegistration(mb, DURATION1);
        Lease mrl = getPullMailboxLease(mr);
  checkLease(mrl, DURATION1);

  logger.log(Level.INFO, "Getting pull mailbox listener");
  RemoteEventListener mbRel = getPullMailboxListener(mr);
View Full Code Here

Examples of net.jini.event.MailboxPullRegistration

    private final long VALID_DURATION_ANY = Lease.ANY;

    public void run() throws Exception {
  PullEventMailbox mb = getPullMailbox();       

  MailboxPullRegistration mr1 = getPullRegistration(mb, DURATION1);
  checkLease(getPullMailboxLease(mr1), DURATION1);

  MailboxPullRegistration mr2 = getPullRegistration(mb, Lease.FOREVER);
  checkLease(getPullMailboxLease(mr2), Lease.FOREVER);

  MailboxPullRegistration mr3 = getPullRegistration(mb, Lease.ANY);
  checkLease(getPullMailboxLease(mr3), Lease.ANY);

  MailboxPullRegistration mr4 = null;
  try {
      mr4 =  getPullRegistration(mb, INVALID_DURATION_NEG);
      throw new TestException("Illegal negative duration value "
          + "was accepted");
  } catch (IllegalArgumentException iae) {
View Full Code Here

Examples of net.jini.event.MailboxPullRegistration

    public void run() throws Exception {
  PullEventMailbox mb = getPullMailbox();       
  int i = 0;

  // Register and check lease
  MailboxPullRegistration mr = getPullRegistration(mb, DURATION1);
  Lease mrl = getPullMailboxLease(mr);
  checkLease(mrl, DURATION1);

  // Create "listener" to collect events for this test
  TestPullListener tpl = TestUtils.createPullListener(manager);
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.