Package net.jini.core.discovery

Examples of net.jini.core.discovery.LookupLocator


  synchronized(this) {
            if (terminated) {
                throw new IllegalStateException("discovery terminated");
            }
            if(proxy == null) return;
      LookupLocator lct = findRegFromProxy(proxy);
      if(lct == null) return;
            /* Remove locator from the set of already-discovered locators */
      LocatorReg reg = removeDiscoveredLocator(lct);
            /* Prepare the information for the discarded event */
            HashMap groupsMap = new HashMap(1);
View Full Code Here


     */
    private void discoverLocators(LookupLocator[] lcts) {
  assert Thread.holdsLock(this);
  discoverLocatorsCalled = true;
  if (lcts == nullreturn;
  LookupLocator lct;
  for(int i=0; i<lcts.length; i++) {
      if(isDiscovered(lcts[i]))  continue;
      LocatorReg reg = findReg(lcts[i]);//in not-yet-discovered map?
      if(reg == null) {
    reg = new LocatorReg(lcts[i]);
View Full Code Here

                        ServiceRegistrar[] regs = e.getRegistrars();
                        logger.finest(eType+" event  -- "+regs.length
                                                         +" lookup(s)");
                        Map groupsMap = e.getGroups();
                        for(int i=0;i<regs.length;i++) {
                            LookupLocator loc = null;
                            try {
                                loc = regs[i].getLocator();
                            } catch (Throwable ex) { /* ignore */ }
                            String[] groups = (String[])groupsMap.get(regs[i]);
                            logger.finest("    "+eType+" locator  = "+loc);
View Full Code Here

  System.out.println("LookupDiscovery in groups:");
  for (int i = 0; i < _groups.length; i++)
      System.out.println("\tgroup " + _groups[i]);
   
  if (lookup != null && lookup.length() > 0) {
      LookupLocator loc = new LookupLocator(lookup);
      LookupLocator[] locArray = new LookupLocator[] { loc };
      LookupLocatorDiscovery disco =
    new LookupLocatorDiscovery(locArray);
      disco.addDiscoveryListener(new Discoverer());
  }
View Full Code Here

      for (int i=0; i < regs.length; i++) {
    try {
        try {
      /* Retrieve the groups of all the discovered lookups */
      String[] regGroups = regs[i].getGroups();
      LookupLocator loc = regs[i].getLocator();
      _lookupSrvc = regs[i];
      String loc_str = loc.toString();
      Vector groupsVec = new Vector();
      /* Look for only lookups in groups that were input */
      System.out.println("  Lookup on host "+loc_str+":");
      System.out.println("regGroups.length = " + regGroups.length);
      for(int j=0; j<regGroups.length; j++) {
View Full Code Here

        int portNumber = port != null && port.length() > 0
      ? Integer.parseInt(port)
      : DefaultLookupPortNumber;
        String host = lookupEl.getAttribute("host");
        _lookupLocators[i] =
      new LookupLocator("jini://"+host+':'+portNumber+'/');
        System.out.println("lookup locator: " + _lookupLocators[i]);
    }
      }
  }
  NodeList servers = el.getElementsByTagName("XmlSearchServer");
View Full Code Here

      for (int i=0; i < regs.length; i++) {
    try {
        try {
      /* Retrieve the groups of all the discovered lookups */
      String[] regGroups = regs[i].getGroups();
      LookupLocator loc = regs[i].getLocator();
      _lookupSrvc = regs[i];
      String loc_str = loc.toString();
      Vector groupsVec = new Vector();
      /* Look for only lookups in groups that were input */
      System.out.println("  Lookup on host "+loc_str+":");
      System.out.println("regGroups.length = " + regGroups.length);
      for(int j=0; j<regGroups.length; j++) {
View Full Code Here

    System.out.println("LookupDiscovery in groups:");
    for (int i = 0; i < _groups.length; i++)
      System.out.println("\tgroup " + _groups[i]);
   
    if (lookup != null && lookup.length() > 0) {
      LookupLocator loc = new LookupLocator(lookup);
      LookupLocator[] locArray = new LookupLocator[] { loc };
      LookupLocatorDiscovery disco = new LookupLocatorDiscovery(locArray);
      disco.addDiscoveryListener(new Discoverer());
    }
    else {
View Full Code Here

         * with those that were started
         */
        for(int i=0;i<regs.length;i++) {
      regs[i] = (ServiceRegistrar)
            getConfig().prepare("test.reggiePreparer", regs[i]);
            LookupLocator curLoc = QAConfig.getConstrainedLocator(regs[i].getLocator());
            if( !lusList.contains(regs[i]) ) {
                throw new TestException(
                                     "registrar from "
                                     +"LookupLocatorDiscover NOT in set "
                                     +"of started lookups -- "
View Full Code Here

        iLoop:
        for(int i=0;i<regs0.length;i++) {
            regs0[i] = (ServiceRegistrar)
           getConfig().prepare("test.reggiePreparer", regs0[i]);
            LookupLocator curLoc0 = QAConfig.getConstrainedLocator(regs0[i].getLocator());
            for(int j=0;j<regs1.length;j++) {
    regs1[j] = (ServiceRegistrar)
               getConfig().prepare("test.reggiePreparer",
         regs1[j]);
                if(regs0[i].equals(regs1[j])) {
View Full Code Here

TOP

Related Classes of net.jini.core.discovery.LookupLocator

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.