Package net.jini.lookup

Examples of net.jini.lookup.ServiceDiscoveryListener


     *           <code>null</code> if the test was successful.
     */
    protected void applyTestDef() throws Exception {
  logger.log(Level.FINE, "requesting a lookup cache");
  lookupCache = srvcDiscoveryMgr.createLookupCache(null,null,null);
        ServiceDiscoveryListener listener = new SrvcDiscoveryListener();
  logger.log(Level.FINE,
       "adding a non-null listener to the lookup cache");
  lookupCache.addListener(listener);
        try {
            logger.log(Level.FINE, "adding a null listener to "
View Full Code Here


        cache.terminate();
        String methodStr = "";
        String successStr = "IllegalStateException occurred as expected -- ";
        String errStr = "  no IllegalStateException -- ";
        boolean failed = false;
        ServiceDiscoveryListener srvcListener
                     = new AbstractBaseTest.SrvcListener(getConfig(),"");

        /* Invoke methods on terminated lookup cache -- addListener */
        methodStr = new String("addListener()");
        logger.log(Level.FINE, "invoking "+methodStr+" ...");
View Full Code Here

        cache.terminate();
        String methodStr = "";
        String successStr = "IllegalStateException occurred as expected -- ";
        String errStr = "  no IllegalStateException -- ";
        boolean failed = false;
        ServiceDiscoveryListener srvcListener
                     = new AbstractBaseTest.SrvcListener(getConfig(),"");

        /* Invoke methods on terminated lookup cache -- addListener */
        methodStr = new String("addListener()");
        logger.log(Level.FINE, "invoking "+methodStr+" ...");
View Full Code Here

     4. Verifies that a <code>NullPointerException</code> is thrown.
     */
    protected void applyTestDef() throws Exception {
  logger.log(Level.FINE, "requesting a lookup cache");
  lookupCache = srvcDiscoveryMgr.createLookupCache(null,null,null);
        ServiceDiscoveryListener listener = new SrvcDiscoveryListener();
  logger.log(Level.FINE,
       "adding a non-null listener to the lookup cache");
  lookupCache.addListener(listener);
        try {
            logger.log(Level.FINE, "adding a null listener to "
View Full Code Here

    public LoadDistributor(ServiceDiscoveryManager sdm) throws RemoteException {
       
        // Create LookupCache
        Class[] types = new Class[] {SettableLoadService.class};
        ServiceTemplate template = new ServiceTemplate(null, types, null);
        ServiceDiscoveryListener listener = new ServiceDiscoveryListener() {
            public void serviceAdded(ServiceDiscoveryEvent event) {
                logger.info("serviceAdded() event received: " + event);
                triggerServiceLoadUpdate();
            }
            public void serviceChanged(ServiceDiscoveryEvent event) {
View Full Code Here

TOP

Related Classes of net.jini.lookup.ServiceDiscoveryListener

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.