Package net.tomp2p.connection

Examples of net.tomp2p.connection.ChannelCreator.shutdown()


            }

            Assert.assertEquals(true, fr.isSuccess());
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            if (sender != null) {
                sender.shutdown().await();
            }
            if (recv1 != null) {
View Full Code Here


            Object ret = fd1.responseMessage().buffer(0).object();
            Assert.assertEquals("yes", ret);
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            if (sender != null) {
                sender.shutdown().await();
            }
            if (recv1 != null) {
View Full Code Here

            System.err.println("done");
            Thread.sleep(2000);

        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            if (sender != null) {
                sender.shutdown().await();
            }
            if (recv1 != null) {
View Full Code Here

            Assert.assertEquals(true, fr.isSuccess());
            SortedSet<PeerAddress> ns = fr.potentialHits();
            Assert.assertEquals(peers[5].peerAddress(), ns.first());
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            for (Peer n : peers) {
                n.shutdown().await();
            }
        }
View Full Code Here

            Assert.assertEquals(false, peers[5].peerAddress().equals(ns.first()));
            Assert.assertEquals(true, peers[4].peerAddress().equals(ns.first()));
            LOG.error("done!");
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            for (Peer n : peers) {
                n.shutdown().await();
            }
        }
View Full Code Here

            Assert.assertEquals(peers[5].peerAddress(), ns.first());
            Assert.assertEquals(false, ns.contains(peers[3].peerAddress()));
            Assert.assertEquals(false, ns.contains(peers[4].peerAddress()));
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            for (Peer n : peers) {
                n.shutdown().await();
            }
        }
View Full Code Here

            Assert.assertEquals(true, ns.contains(peers[2].peerAddress()));
            Assert.assertEquals(false, ns.contains(peers[3].peerAddress()));
            Assert.assertEquals(true, ns.contains(peers[4].peerAddress()));
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            for (Peer n : peers) {
                n.shutdown().await();
            }
        }
View Full Code Here

            Assert.assertEquals(true, ns.contains(peers[3].peerAddress()));
            Assert.assertEquals(true, ns.contains(peers[4].peerAddress()));
            Assert.assertEquals(6, ns.size());
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            for (Peer n : peers) {
                n.shutdown().await();
            }
        }
View Full Code Here

            Assert.assertEquals(true, fr.isSuccess());
            SortedSet<PeerAddress> ns = fr.potentialHits();
            Assert.assertEquals(peers[20].peerAddress(), ns.first());
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            if (master != null) {
                master.shutdown().await();
            }
        }
View Full Code Here

                Assert.assertEquals(peers[rnd3.nextInt(peers.length)].peerAddress(), ns.first());
            }
            System.err.println("done!");
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            if (master != null) {
                master.shutdown().await();
            }
        }
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.