@Test public void testBoundListenerPeersAfterProgrammaticCacheAdd() throws RemoteException { String[] boundCachePeers = ((RMICacheManagerPeerListener) manager1.getCachePeerListener("RMI")).listBoundRMICachePeers(); assertEquals(55, boundCachePeers.length); validateBoundCachePeer(boundCachePeers); RMICacheReplicatorFactory factory = new RMICacheReplicatorFactory(); CacheEventListener replicatingListener = factory.createCacheEventListener(null); Cache cache = new Cache("programmaticallyAdded", 10, null, true, System.getProperty("java.io.tmpdir"), false, 10, 10, false, 60, null); cache.getCacheEventNotificationService().registerListener(replicatingListener); manager1.addCache(cache); boundCachePeers = ((RMICacheManagerPeerListener) manager1.getCachePeerListener("RMI")).listBoundRMICachePeers(); assertEquals(56, boundCachePeers.length); validateBoundCachePeer(boundCachePeers); }
protected String[] listBoundRMICachePeers() throws CacheException { try { return registry.list(); } catch (RemoteException e) { throw new CacheException("Unable to list cache peers " + e.getMessage()); } }
RMICacheManagerPeerListener implements CacheManagerPeerListener { protected String[] listBoundRMICachePeers() throws CacheException { try { return registry.list(); } catch (RemoteException e) { throw new CacheException("Unable to list cache peers " + e.getMessage()); } } }
RMICacheManagerPeerListener implements CacheManagerPeerListener { protected String[] listBoundRMICachePeers() throws CacheException { try { return registry.list(); } catch (RemoteException e) { throw new CacheException("Unable to list cache peers " + e.getMessage()); } } RMICacheManagerPeerListener(String hostName, Integer port, Integer remoteObjectPort, CacheManager cacheManager,
                                       Integer socketTimeoutMillis); }
RMICacheManagerPeerListener implements CacheManagerPeerListener { protected String[] listBoundRMICachePeers() throws CacheException { try { return registry.list(); } catch (RemoteException e) { throw new CacheException("Unable to list cache peers " + e.getMessage()); } } RMICacheManagerPeerListener(String hostName, Integer port, Integer remoteObjectPort, CacheManager cacheManager,
                                       Integer socketTimeoutMillis); void init(); void dispose(); List getBoundCachePeers(); Status getStatus(); String getUniqueResourceIdentifier(); void attemptResolutionOfUniqueResourceConflict(); String getScheme(); void notifyCacheAdded(String cacheName); void notifyCacheRemoved(String cacheName); }
RMICacheManagerPeerListener implements CacheManagerPeerListener { protected String[] listBoundRMICachePeers() throws CacheException { try { return registry.list(); } catch (RemoteException e) { throw new CacheException("Unable to list cache peers " + e.getMessage()); } } RMICacheManagerPeerListener(String hostName, Integer port, Integer remoteObjectPort, CacheManager cacheManager,
                                       Integer socketTimeoutMillis); void init(); void dispose(); List getBoundCachePeers(); Status getStatus(); String getUniqueResourceIdentifier(); void attemptResolutionOfUniqueResourceConflict(); String getScheme(); void notifyCacheAdded(String cacheName); void notifyCacheRemoved(String cacheName);  }