Package net.jini.discovery

Examples of net.jini.discovery.LookupDiscovery$DecodeAnnouncementTask


        try {
            logger.log(Level.FINE, "creating a new "
                              +"LookupDiscovery configured to discover -- ");
            GroupsUtil.displayGroupSet(nullGroups,"  group",
                                       Level.FINE);
            newLD = new LookupDiscovery(nullGroups,
                                        getConfig().getConfiguration());
            lookupDiscoveryList.add(newLD);
        } catch(NullPointerException e) {
            logger.log(Level.FINE, "NullPointerException on "
                              +"construction of LookupDiscovery as expected");
View Full Code Here


        logger.log(Level.FINE,
                          "LookupDiscovery just created should "
                          +"additionally discover groups -- ");
        GroupsUtil.displayGroupSet(additionalGroups,
                                   "  additionalGroups",Level.FINE);
        LookupDiscovery ld = new LookupDiscovery(groupsToDiscover,
             getConfig().getConfiguration());
        lookupDiscoveryList.add(ld);
        LookupListener newListener = new AbstractBaseTest.LookupListener();

        /* Verify that the lookup discovery utility created above is
         * operational by verifying that the INITIIAL lookups are
         * discovered by both listeners.
         */
        logger.log(Level.FINE,
                      "verifying discovery for initial listener ...");
        mainListener.setLookupsToDiscover(initLookupsToStart);
        ld.addDiscoveryListener(mainListener);
        waitForDiscovery(mainListener);

        logger.log(Level.FINE,
                 "verifying discovery for listener to be removed ...");
        newListener.setLookupsToDiscover(initLookupsToStart);
        ld.addDiscoveryListener(newListener);
        waitForDiscovery(newListener);

        /* Remove the listener */
        ld.removeDiscoveryListener(newListener);
        logger.log(Level.FINE,
                          "removed listener from lookup discovery");

        /* Verify that the listener still registered with the lookup
         * discovery utility (mainListener) continues to receive
View Full Code Here

     * </ul>
     */
    public void run() throws Exception {
        logger.log(Level.FINE, "run()");
        try {
            LookupDiscovery newLD = new LookupDiscovery
                                        (DiscoveryGroupManagement.ALL_GROUPS,
           getConfig().getConfiguration());
            lookupDiscoveryList.add(newLD);
            String[] oldGroups = newLD.getGroups();
            logger.log(Level.FINE, "current groups lookup "
                              +"discovery is configured to discover --");
            GroupsUtil.displayGroupSet(oldGroups,"  curGroup",
                                       Level.FINE);
            /* Attempt to remove a finite set of groups to the original set */
            logger.log(Level.FINE, "invoking removeGroups to "
                              +"remove from the groups to discover --");
            GroupsUtil.displayGroupSet(groupsToDiscover,"  newGroups",
                                       Level.FINE);
            newLD.removeGroups(groupsToDiscover);
        } catch(UnsupportedOperationException e) {
            logger.log(Level.FINE, "UnsupportedOperationException "
                              +"on attempt to remove groups from ALL_GROUPS, "
                              +"as expected");
            return;
View Full Code Here

     *  parent class).
     */
    public void setup(QAConfig sysConfig) throws Exception {
        delayLookupStart = true;//don't start lookups, just want config info
  super.setup(sysConfig);
  newLD = new LookupDiscovery(groupsToDiscover,
            sysConfig.getConfiguration());
  lookupDiscoveryList.add(newLD);
    }//end setup
View Full Code Here

     *   compared.
     */
    public void run() throws Exception {
        logger.log(Level.FINE, "run()");
        /* Create another LookupDiscovery for comparison */
        LookupDiscovery newLD = new LookupDiscovery
                                     (DiscoveryGroupManagement.NO_GROUPS,
              getConfig().getConfiguration());
        lookupDiscoveryList.add(newLD);
        if( !satisfiesEqualityTest(lookupDiscovery,newLD) ) {
            throw new TestException(
View Full Code Here

        logger.log(Level.FINE, "creating a new "
                          +"LookupDiscovery initially configured to "
                          +"discover -- ");
        GroupsUtil.displayGroupSet(groupsToDiscover,"  initGroup",
                                   Level.FINE);
        newLD = new LookupDiscovery(groupsToDiscover,
            getConfig().getConfiguration());
        lookupDiscoveryList.add(newLD);


        String[] curGroups = newLD.getGroups();
View Full Code Here

                          "starting discovery by creating a "
                          +"LookupDiscovery to discover -- ");
        for(int i=0;i<groupsToDiscover.length;i++) {
            logger.log(Level.FINE, "   "+groupsToDiscover[i]);
        }//end loop
        LookupDiscovery ld = new LookupDiscovery(groupsToDiscover,
                                          getConfig().getConfiguration());
        lookupDiscoveryList.add(ld);

        /* Verify that the lookup discovery utility created above is
         * operational by verifying that the INITIIAL lookups are
         * discovered.
         */
        mainListener.setLookupsToDiscover(initLookupsToStart);
        ld.addDiscoveryListener(mainListener);
        waitForDiscovery(mainListener);

        /* Terminate the lookup discovery utility */
        ld.terminate();
        logger.log(Level.FINE, "terminated lookup discovery");


        /* Since the lookup discovery utility was terminated, the listener
         * should receive no more events when new lookups are started that
View Full Code Here

  /* Start group discovery by creating a lookup discovery  utility */
  logger.log(Level.FINE,
       "creating a lookup discovery initially "
       +"configured to discover NO_GROUPS");
  /* discover no groups at first, wait for test to call setGroups */
  lookupDiscovery = new LookupDiscovery
      (DiscoveryGroupManagement.NO_GROUPS,
       sysConfig.getConfiguration());
  lookupDiscoveryList.add(lookupDiscovery);
  mainListener = new LookupListener();
    }
View Full Code Here

      LookupLocator[] locArray = new LookupLocator[] { loc };
      LookupLocatorDiscovery disco = new LookupLocatorDiscovery(locArray);
      disco.addDiscoveryListener(new Discoverer());
    }
    else {
      LookupDiscovery disco = new LookupDiscovery(_groups);
      disco.addDiscoveryListener(new Discoverer());
    }
  }
View Full Code Here

    Entry[] attrs = new Entry[]
      { new BasicServiceType(serviceType) };
    _serviceTemplate = new ServiceTemplate(null, null, attrs);
   
    // set up for discovery
    LookupDiscovery disco = new LookupDiscovery(_groups);
    disco.addDiscoveryListener(new Discoverer());
  }
View Full Code Here

TOP

Related Classes of net.jini.discovery.LookupDiscovery$DecodeAnnouncementTask

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.