Package net.tomp2p.connection

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


                Assert.assertEquals(true, fm.object().element0().isSuccess());
                Assert.assertEquals(true, fm.object().element1().isSuccess());
            }
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            if (master != null) {
                master.shutdown().await();
            }
        }
View Full Code Here


                    ss.remove(pa);
                    ss2.remove(pa2);
                }
            } finally {
                if (cc != null) {
                    cc.shutdown().awaitListenersUninterruptibly();
                }
                if (master != null) {
                    master.shutdown().awaitListenersUninterruptibly();
                }
            }
View Full Code Here

            // we are able to fit 40 neighbors into 1400 bytes
            Assert.assertEquals(33, pas.size());
            Assert.assertEquals(new Number160("0x1"), pas.neighbors().iterator().next().peerId());
            Assert.assertEquals(PORT_TCP, pas.neighbors().iterator().next().tcpPort());
            Assert.assertEquals(PORT_UDP, pas.neighbors().iterator().next().udpPort());
            cc.shutdown();
        } finally {
            if (sender != null) {
                sender.shutdown().await();
            }
            if (recv1 != null) {
View Full Code Here

            // we are able to fit 40 neighbors into 1400 bytes
            Assert.assertEquals(33, pas.size());
            Assert.assertEquals(new Number160("0x1"), pas.neighbors().iterator().next().peerId());
            Assert.assertEquals(PORT_TCP, pas.neighbors().iterator().next().tcpPort());
            Assert.assertEquals(PORT_UDP, pas.neighbors().iterator().next().udpPort());
            cc.shutdown();
        } finally {
            if (sender != null) {
                sender.shutdown().await();
            }
            if (recv1 != null) {
View Full Code Here

            Assert.assertEquals(true, fr.isSuccess());
            NeighborSet pas = fr.responseMessage().neighborsSet(0);

            // I see no one, not evenmyself. My peer was added in the overflow map
            Assert.assertEquals(0, pas.size());
            cc.shutdown();
        } finally {
            if (sender != null) {
                sender.shutdown().await();
            }
            if (recv1 != null) {
View Full Code Here

                SearchValues v = new SearchValues(new Number160("0x30"), null);
                neighbors2.closeNeighbors(sender.peerAddress(), v,
                        Type.EXCEPTION, cc, new DefaultConnectionConfiguration());
                Assert.fail("");
            } catch (IllegalArgumentException i) {
                cc.shutdown();
            }
        } finally {
            if (sender != null) {
                sender.shutdown().await();
            }
View Full Code Here

            Assert.assertEquals(33, pas.size());
            Assert.assertEquals(10, (int) fr.responseMessage().intAt(0));
            Assert.assertEquals(new Number160("0x1"), pas.neighbors().iterator().next().peerId());
            Assert.assertEquals(PORT_TCP, pas.neighbors().iterator().next().tcpPort());
            Assert.assertEquals(PORT_UDP, pas.neighbors().iterator().next().udpPort());
            cc.shutdown();
        } finally {
            if (sender != null) {
                sender.shutdown().await();
            }
            if (recv1 != null) {
View Full Code Here

                Assert.assertEquals((Integer) 1, (Integer) data.object());
            }

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

            c = result2.get(key2);
            Assert.assertEquals(c, test2);

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

            Number640 key2 = new Number640(new Number160(33), Number160.createHash("test"), new Number160(88), Number160.ZERO);
            c = storeRecv.get(key2);
            Assert.assertEquals(c, test2);
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            if (sender != null) {
                sender.shutdown().await();
            }
            if (recv1 != null) {
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.