Examples of LookupDiscoveryManager


Examples of net.jini.discovery.LookupDiscoveryManager

                                          "and ignore this setting. Check the<br>" +
                                          "log file for details.</html>",
                                          "Locators Incorrect",
                                          JOptionPane.WARNING_MESSAGE);
        }
        jiniClient = new JiniClient(new LookupDiscoveryManager(groups, locators, null, config));
        ServiceTemplate monitors = new ServiceTemplate(null, new Class[]{ProvisionMonitor.class}, null);
        ServiceTemplate cybernodes = new ServiceTemplate(null, new Class[]{Cybernode.class}, null);
        ServiceTemplate eventCollectors = new ServiceTemplate(null,
                                                              new Class[]{EventCollector.class},
                                                              new Entry[]{new OperationalStringEntry(org.rioproject.config.Constants.CORE_OPSTRING)});
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryManager

    }

    @Before
    public void setup() throws Exception {
        listener = new DL();
        discoveryManagement = new LookupDiscoveryManager(new String[]{"foo"}, null, listener);
        deploymentVerifier = new DeploymentVerifier(EmptyConfiguration.INSTANCE, discoveryManagement);
    }
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryManager

        Assert.assertFalse(hasGroup(registrar, "gack"));
        ServiceElement service = createSE("gack");
        Assert.assertTrue(waitForDiscovery(listener));
        Assert.assertTrue(listener.discovered.get());
        DL newDiscoListener = new DL();
        new LookupDiscoveryManager(new String[]{"gack"}, null, newDiscoListener);
        deploymentVerifier.ensureGroups(service);
        Assert.assertTrue(waitForDiscovery(newDiscoListener));
        Assert.assertTrue(hasGroup(registrar, "gack"));
    }
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryManager

        Assert.assertFalse(hasGroup(registrar, "gack"));
        Assert.assertFalse(hasGroup(registrar, "blutarsky"));
        ServiceElement service = createSE("gack", "blutarsky");
        Assert.assertTrue(listener.discovered.get());
        DL newDiscoListener = new DL();
        new LookupDiscoveryManager(new String[]{"gack"}, null, newDiscoListener);
        deploymentVerifier.ensureGroups(service);
        Assert.assertTrue(waitForDiscovery(newDiscoListener));
        Assert.assertTrue(hasGroup(registrar, "gack"));
        Assert.assertTrue(hasGroup(registrar, "blutarsky"));
    }
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryManager

    private void startLookup(String... groups) throws Exception {
        DynamicConfiguration configuration = new DynamicConfiguration();
        configuration.setEntry("com.sun.jini.reggie", "initialMemberGroups", String[].class, groups);
        registrar = new Reggie(configuration, null);
        listener = new DL();
        discoveryManagement = new LookupDiscoveryManager(new String[]{"foo"}, null, listener);
        deploymentVerifier = new DeploymentVerifier(EmptyConfiguration.INSTANCE, discoveryManagement);
    }
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryManager

                                                   String[] groups,
                                                   LookupLocator[] locators,
                                                   DiscoveryListener listener,
                                                   Configuration config) throws IOException {
       
        LookupDiscoveryManager ldm  ;
        synchronized(this) {
            DiscoveryControl discoControl = getDiscoveryControl(sharedName);
            if(discoControl==null) {
                discoControl = new DiscoveryControl(sharedName);
                pool.add(discoControl);
                if(logger.isDebugEnabled())
                    logger.debug("Create new DiscoveryControl for [{}]", sharedName);
            } else {
                if(logger.isDebugEnabled())
                    logger.debug("DiscoveryControl obtained for [{}]", sharedName);
            }
            ldm = discoControl.getLookupDiscoveryManager(groups, locators);       
            if(ldm==null) {
                ldm = discoControl.createLookupDiscoveryManager(groups, locators, listener, config);
            } else {
                ((SharedDiscoveryManager)ldm).incrementRefCounter();
                if(listener!=null)
                    ldm.addDiscoveryListener(listener);
            }
        }
        return(ldm);
    }
View Full Code Here

Examples of net.jini.discovery.LookupDiscoveryManager

    }

    public static void main(String[] args) throws Exception {
        Class[] classes = new Class[]{bean.Hello.class};
        ServiceTemplate tmpl = new ServiceTemplate(null, classes, null);
        LookupDiscoveryManager ldm =
                new LookupDiscoveryManager(LookupDiscoveryManager.ALL_GROUPS,
                                           null,
                                           null);
        System.out.println("Discovering Hello service ...");
        ServiceDiscoveryManager sdm =
                new ServiceDiscoveryManager(ldm, new LeaseRenewalManager());
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.