Package net.jini.core.event

Examples of net.jini.core.event.RemoteEventListener


  MailboxPullRegistration mr = getPullRegistration(mb, DURATION1);
        Lease mrl = getPullMailboxLease(mr);
  checkLease(mrl, DURATION1);

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

  // Create an event generator and pass it the
  // mailbox's remote event listener.
  TestGenerator myGen = TestUtils.createGenerator(manager);
  EventRegistration evtReg =
View Full Code Here


  MailboxRegistration mr = getRegistration(mb, DURATION1);
  Lease mrl = getMailboxLease(mr);
  checkLease(mrl, DURATION1);

  // Get the mailbox service provided listener
  RemoteEventListener mbRel = getMailboxListener(mr);

  // Create an event generator and pass it the
  // mailbox's remote event listener.
  TestGenerator myGen = TestUtils.createGenerator(manager);
  EventRegistration evtReg =
View Full Code Here

  MailboxRegistration mr2 = getRegistration(mb, DURATION1);
  Lease mrl2 = getMailboxLease(mr2);
  checkLease(mrl2, DURATION1);

  // Get the mailbox service provided listener
  RemoteEventListener mbRel1 = getMailboxListener(mr1);
  RemoteEventListener mbRel2 = getMailboxListener(mr2);

  // Re-submit the listener1 to registration1 and
  // verify that it is not accepted
  try {
      mr1.enableDelivery(mbRel1);
View Full Code Here

  checkLease(mrl, DURATION1);
  logger.log(Level.INFO, "Mailbox lease good until "
      + new Date(mrl.getExpiration()));

  // Get the mailbox service provided listener
  RemoteEventListener mbRel = getMailboxListener(mr);
  logger.log(Level.INFO, "Got RemoteEventListener ref {0}", mbRel);

  // Create an event generator and pass it the
  // mailbox's remote event listener.
  TestGenerator myGen = TestUtils.createGenerator(manager);
View Full Code Here

  MailboxRegistration mr = getRegistration(mb, DURATION1);
  Lease mrl = getMailboxLease(mr);
  checkLease(mrl, DURATION1);

  // Get the mailbox service provided listener
  RemoteEventListener mbRel = getMailboxListener(mr);

  // Create an event generator and pass it the
  // mailbox's remote event listener.
  TestGenerator myGen = TestUtils.createGenerator(manager);
  EventRegistration evtReg =
View Full Code Here

  // Create "listener" to collect events for this test
  TestPullListener tpl = TestUtils.createPullListener(manager);

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

  // Create an event generator and pass it the
  // mailbox's remote event listener.
  TestGenerator myGen = TestUtils.createGenerator(manager);
  EventRegistration evtReg =
View Full Code Here

            ServiceResource sr = getNextServiceResource();
            if(sr == null)
                throw new NoEventConsumerException("No event consumers");
            try {
                EventRegistrationResource er = (EventRegistrationResource)sr.getResource();
                RemoteEventListener listener = er.getListener();
                MarshalledObject handback = er.getHandback();
                event.setHandback(handback);
                t0 = System.currentTimeMillis();
                listener.notify(event);
                t1 = System.currentTimeMillis();
                sendTime = t1 - t0;
                if(responseWatch != null)
                    responseWatch.setElapsedTime(sendTime, t1);
                sequenceNumber++;
View Full Code Here

                        logger.trace("Removing Resource and Cancelling Lease", e);
                }
                continue;
            }
            try {
                RemoteEventListener listener = er.getListener();
                MarshalledObject handback = er.getHandback();
                event.setHandback(handback);
                t0 = System.currentTimeMillis();
                listener.notify(event);
                t1 = System.currentTimeMillis();
                sendTime = t1 - t0;
                if (responseWatch != null)
                    responseWatch.setElapsedTime(sendTime, t1);
                sent++;
View Full Code Here

        Assert.assertNotNull(eventCollector);
        EventCollectorRegistration registration1 = eventCollector.register(Lease.ANY);
        EventCollectorRegistration registration2 = eventCollector.register(Lease.ANY);

        BasicEventListener listener1 = new BasicEventListener();
        RemoteEventListener eventListener = listener1.export();
        registration1.enableDelivery(eventListener);

        try {
            logger.info("Deploy ....");
            testManager.deploy(new File("src/test/opstring/outrigger.groovy"));
View Full Code Here

        EventHandler eHandler = eventTable.get(descriptor.eventID);
        if(eHandler == null)
            throw new UnknownEventException("Unknown event ID "+descriptor.eventID);

        /* Prepare the RemoteEventListener */
        RemoteEventListener preparedListener = (RemoteEventListener)listenerPreparer.prepareProxy(listener);
        if(logger.isDebugEnabled())
            logger.debug("Register listener {} for Event {}", preparedListener.toString(), descriptor.toString());
        Object o = getServiceProxy();
        if(!(o instanceof EventProducer)) {
            String reason = "Proxy returned from getServiceProxy() does " +
                           "not implement "+EventProducer.class.getName();
            logger.warn(reason);
View Full Code Here

TOP

Related Classes of net.jini.core.event.RemoteEventListener

Copyright © 2018 www.massapicom. 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.