Examples of LookupDiscoveryRegistration


Examples of net.jini.discovery.LookupDiscoveryRegistration

    {
        Set eSet = regInfoMap.entrySet();
        Iterator iter = eSet.iterator();
        for(int j=0;iter.hasNext();j++) {
            Map.Entry pair = (Map.Entry)iter.next();
            LookupDiscoveryRegistration ldsReg =
                                    (LookupDiscoveryRegistration)pair.getKey();
            LDSEventListener regListener = (LDSEventListener)pair.getValue();
            RegistrationInfo regInfo = regListener.getRegInfo();
      setExpectedDiscoveredMap(regInfo,ldsReg);
            ldsReg.addLocators(locators);
        }//end loop(j)
    }//end addLocatorsDo
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryRegistration

    void removeLocatorsDo(LookupLocator[] locators) throws Exception {
        Set eSet = regInfoMap.entrySet();
        Iterator iter = eSet.iterator();
        for(int j=0;iter.hasNext();j++) {
            Map.Entry pair = (Map.Entry)iter.next();
            LookupDiscoveryRegistration ldsReg =
                                    (LookupDiscoveryRegistration)pair.getKey();
            LDSEventListener regListener = (LDSEventListener)pair.getValue();
            RegistrationInfo regInfo = regListener.getRegInfo();
      setExpectedDiscardedMap(regInfo,ldsReg);
      ldsReg.removeLocators(locators);
        }//end loop(j)
    }//end removeLocatorsDo
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryRegistration

    void removeGroupsDo(String[] groupsToRemove) throws Exception {
        Set eSet = regInfoMap.entrySet();
        Iterator iter = eSet.iterator();
        for(int j=0;iter.hasNext();j++) {
            Map.Entry pair = (Map.Entry)iter.next();
            LookupDiscoveryRegistration ldsReg =
                                    (LookupDiscoveryRegistration)pair.getKey();

            LDSEventListener regListener = (LDSEventListener)pair.getValue();
            RegistrationInfo regInfo = regListener.getRegInfo();
            int rID = regInfo.handback;
      logger.log(Level.FINE,
           "  registration_"+rID
           +" -- request removal of groups");
      if((groupsToRemove!=null)&&(groupsToRemove.length<=0)) {
    logger.log(Level.FINE, "   NO_GROUPS");
      } else {
    GroupsUtil.displayGroupSet(groupsToRemove,
             "   removeGroup",Level.FINE);
      }//endif
      setExpectedDiscardedMap(regInfo);
      ldsReg.removeGroups(groupsToRemove);
        }//end loop(j)
    }//end removeGroupsDo
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryRegistration

    void setGroupsDo(String[] newGroups) throws Exception {
        Set eSet = regInfoMap.entrySet();
        Iterator iter = eSet.iterator();
        for(int j=0;iter.hasNext();j++) {
            Map.Entry pair = (Map.Entry)iter.next();
            LookupDiscoveryRegistration ldsReg =
                                    (LookupDiscoveryRegistration)pair.getKey();

            LDSEventListener regListener = (LDSEventListener)pair.getValue();
            RegistrationInfo regInfo = regListener.getRegInfo();
            int rID = regInfo.handback;
      logger.log(Level.FINE,
           "registration_"+rID
           +" -- request discovery of new groups");
      if((newGroups != null)&&(newGroups.length <= 0)) {
    logger.log(Level.FINE, "   NO_GROUPS");
      } else {
    GroupsUtil.displayGroupSet(newGroups,
             "   newGroup",Level.FINE);
      }//endif
      setExpectedDiscardedMap(regInfo);
      ldsReg.setGroups(newGroups);
        }//end loop(j)
    }//end setGroupsDo
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryRegistration

            } catch(RemoteException e) {
                Set eSet = regInfoMap.entrySet();
                Iterator iter = eSet.iterator();
                for(int j=0;iter.hasNext();j++) {
                    Map.Entry pair = (Map.Entry)iter.next();
                    LookupDiscoveryRegistration ldsReg =
                                    (LookupDiscoveryRegistration)pair.getKey();

                    LDSEventListener regListener =
                                             (LDSEventListener)pair.getValue();
                    RegistrationInfo regInfo = regListener.getRegInfo();
                    int rID = regInfo.handback;
        logger.log(Level.FINE, "  registration_"+rID
             +" -- discarding lookup service "+i);
        ldsReg.discard(proxies[i]);
                    logger.log(Level.FINE, " registration_"+rID
                               +" -- discarded lookup service "+i);
                }//end loop(j)
            } catch(Exception exc) { // just for logging purposes
              logger.log(Level.FINE, " ******* exception during pingAndDiscard ********");
 
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryRegistration

    void setLocatorsDo(LookupLocator[] newLocators) throws Exception {
        Set eSet = regInfoMap.entrySet();
        Iterator iter = eSet.iterator();
        for(int j=0;iter.hasNext();j++) {
            Map.Entry pair = (Map.Entry)iter.next();
            LookupDiscoveryRegistration ldsReg =
                                    (LookupDiscoveryRegistration)pair.getKey();

            LDSEventListener regListener = (LDSEventListener)pair.getValue();
            RegistrationInfo regInfo = regListener.getRegInfo();
            int rID = regInfo.handback;
      logger.log(Level.FINE,
           "  registration_"+rID
           +" -- request discovery of new locators");
     
      if((newLocators != null)&&(newLocators.length <= 0)) {
    logger.log(Level.FINE, "   NO_LOCATORS");
      } else {
    LocatorsUtil.displayLocatorSet(newLocators,
                                               "   newLocator",Level.FINE);
      }//endif
      setExpectedDiscardedMap(regInfo);
      ldsReg.setLocators(newLocators);
        }//end loop(j)
    }//end setLocatorsDo
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryRegistration

    void removeLocatorsDo(LookupLocator[] newLocators) throws Exception {
        Set eSet = regInfoMap.entrySet();
        Iterator iter = eSet.iterator();
        for(int j=0;iter.hasNext();j++) {
            Map.Entry pair = (Map.Entry)iter.next();
            LookupDiscoveryRegistration ldsReg =
                                    (LookupDiscoveryRegistration)pair.getKey();

            LDSEventListener regListener = (LDSEventListener)pair.getValue();
            RegistrationInfo regInfo = regListener.getRegInfo();
            int rID = regInfo.handback;
      logger.log(Level.FINE,
           "  registration_"+rID
           +" -- request removal of locators");
     
      if((newLocators != null)&&(newLocators.length <= 0)) {
    logger.log(Level.FINE, "   NO_LOCATORS");
      } else {
    LocatorsUtil.displayLocatorSet(newLocators,
                 "   removeLocator",Level.FINE);
      }//endif
      setExpectedDiscardedMap(regInfo);
      ldsReg.removeLocators(newLocators);
        }//end loop(j)
    }//end removeLocatorsDo
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryRegistration

        }//endif
        /* Prepare the locators associated with the requested registration
         * outside of the sync block because of possible remote call.
         */
        prepareNewLocators(locatorToDiscoverPreparer,locators);
        LookupDiscoveryRegistration reg = null;
        concurrentObj.writeLock();
        try {
            /*  Grant the registration request and add the registration to
             *  to this service's state.
             *
 
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryRegistration

        RegistrationInfo regInfo = new RegistrationInfo(groupsToDiscover,
                                                        locatorsToDiscover,
                                                        iHandback);
        LDSEventListener listener =
                               new AbstractBaseTest.LDSEventListener(regInfo);
        LookupDiscoveryRegistration ldsReg = null;
  try {
      ldsReg = discoverySrvc.register(groupsToDiscover,
              locatorsToDiscover,
              listener,
              mHandback,
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryRegistration

     */
    protected void addGroupsOneReg(String[]  groups,
                                   Map.Entry regListenerPair)
                                                       throws RemoteException
    {
        LookupDiscoveryRegistration reg
                 = (LookupDiscoveryRegistration)regListenerPair.getKey();
        RegistrationInfo regInfo 
                 = ((LDSEventListener)regListenerPair.getValue()).getRegInfo();
        String[] groupsToDiscover = groups;
        if(   (regInfo.groupsToDiscover != DiscoveryGroupManagement.ALL_GROUPS)
            &&(groups != DiscoveryGroupManagement.ALL_GROUPS) )
       {
            int curLen = (regInfo.groupsToDiscover).length;
            int newLen = groups.length;
            groupsToDiscover = new String[curLen + newLen];
            for(int i=0;i<curLen;i++) {
                groupsToDiscover[i] = new String(regInfo.groupsToDiscover[i]);
            }//end loop
            for(int i=curLen;i<(curLen+newLen);i++) {
                groupsToDiscover[i] = new String(groups[i-curLen]);
            }//end loop
            synchronized(regInfo) {
                /* update the expected state for this regInfo information */
                regInfo.setLookupsToDiscover(groupsToDiscover,
                                             new LookupLocator[0]);
            }//end sync(regInfo)
        }//endif
        /* Add to the groups the lds should discover for this registration */
        reg.addGroups(groups);
    }//end addGroupsOneReg
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.