Package net.jini.lease

Examples of net.jini.lease.LeaseRenewalManager


    public void initialize(final EventCollectorContext context) throws Exception {
        if(context==null)
            throw new IllegalArgumentException("context must not be null");
        this.eventQ = context.getEventQueue();
        ServiceDiscoveryManager sdm = new ServiceDiscoveryManager(context.getDiscoveryManager(),
                                                                  new LeaseRenewalManager(context.getConfiguration()),
                                                                  context.getConfiguration());
        for(EventDescriptor eventDescriptor : context.getEventDescriptors()) {
            ServiceTemplate template = new ServiceTemplate(null, null, new Entry[]{eventDescriptor});
            LookupCache lCache = sdm.createLookupCache(template, null,  null);
            EventProducerManager eventProducerManager = new EventProducerManager(eventDescriptor, this, lCache);
View Full Code Here


        DiscoveryManagement discoMgr = discoPool.getDiscoveryManager("cli", groups, locators, null, config);
        //LookupDiscoveryManager discoMgr =
        //    new LookupDiscoveryManager(groups, locators, null, lookupConfig);
        recordingDiscoveryListener = new RecordingDiscoveryListener(discoMgr);
        discoMgr.addDiscoveryListener(recordingDiscoveryListener);
        sdm = new ServiceDiscoveryManager(discoMgr, new LeaseRenewalManager());

        allServices = new ServiceTemplate(null, null, null);
        cybernodeServices = new ServiceTemplate(null, new Class[] {Cybernode.class}, null);
        monitorServices = new ServiceTemplate(null, new Class[] {ProvisionMonitor.class}, null);
        if(!CLI.getInstance().commandLine) {
View Full Code Here

            config = (config==null?EmptyConfiguration.INSTANCE:config);
            ServiceDiscoveryManager sdm =
                new ServiceDiscoveryManager(DiscoveryManagementPool.getInstance().getDiscoveryManager(sharedName,
                                                                                                      groupsToMatch,
                                                                                                      locatorsToMatch),
                                            new LeaseRenewalManager(config),
                                            config);
                   
            sdmWrapper = new SDMWrapper(sharedName, sdm, groupsToMatch, locatorsToMatch);
            synchronized(pool) {
                pool.add(sdmWrapper);
View Full Code Here

                                final DiscoveryManagement dMgr,
                                final Configuration config) throws Exception {
        super(edTemplate, listener, handback, config);
        ServiceTemplate template = new ServiceTemplate(null, null, new Entry[]{edTemplate});
        Configuration configInstance = config==null?EmptyConfiguration.INSTANCE:config;
        sdm = new ServiceDiscoveryManager(dMgr, new LeaseRenewalManager(configInstance), configInstance);
        lCache = sdm.createLookupCache(template, null,  null);
        lCache.addListener(new EventProducerManager());
    }
View Full Code Here

        ccl = Thread.currentThread().getContextClassLoader();
        leaseMgr = (LeaseRenewalManager) Config.getNonNullEntry(config,
                                                                BROWSER,
                                                                "leaseManager",
                                                                LeaseRenewalManager.class,
                                                                new LeaseRenewalManager(config));
        isAdmin = (Boolean) config.getEntry(BROWSER, "folderView", boolean.class, Boolean.TRUE);
        leasePreparer = (ProxyPreparer) Config.getNonNullEntry(config,
                                                               BROWSER,
                                                               "leasePreparer",
                                                               ProxyPreparer.class,
View Full Code Here

                new LookupDiscoveryManager(LookupDiscoveryManager.ALL_GROUPS,
                                           null,
                                           null);
        System.out.println("Discovering Hello service ...");
        ServiceDiscoveryManager sdm =
                new ServiceDiscoveryManager(ldm, new LeaseRenewalManager());
        /* Wait no more then 10 seconds to discover the service */
        ServiceItem item = sdm.lookup(tmpl, null, 10000);
        if(item != null) {
            System.out.println("Discovered Hello service");
            Hello hello = (Hello)item.service;
View Full Code Here

TOP

Related Classes of net.jini.lease.LeaseRenewalManager

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.