Package net.tomp2p.connection

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


                    if (!fr2.isSuccess())
                        System.err.println("fail " + fr2.failedReason());
                    Assert.assertEquals(true, fr2.isSuccess());
                }
                list.clear();
                cc.shutdown().await();
            }
            System.out.println("TCP time: " + (System.currentTimeMillis() - start));
            for (FutureResponse fr2 : list) {
                fr2.awaitUninterruptibly();
                Assert.assertEquals(true, fr2.isSuccess());
View Full Code Here


                    System.err.println("waiting for " + (ii++) + fr2.request());
                    fr2.awaitUninterruptibly();
                    Assert.assertEquals(true, fr2.isSuccess());
                }
                list.clear();
                cc.shutdown().await();
            }

            System.out.println("UDP time: " + (System.currentTimeMillis() - start));
        } finally {
            if (sender != null) {
View Full Code Here

                } else {
                    System.out.println("offline " + pa);
                }
                FutureResponse fr2 = peer.pingRPC().pingUDP(pa, cc, new DefaultConnectionConfiguration());
                fr2.awaitUninterruptibly();
                cc.shutdown().awaitUninterruptibly();
                if (fr2.isSuccess()) {
                    System.out.println("peer online UDP:" + pa);
                } else {
                    System.out.println("offline " + pa);
                }
View Full Code Here

        }

        FutureResponse fr2 = master.pingRPC().pingUDP(pa, cc, new DefaultConnectionConfiguration());
        fr2.awaitUninterruptibly();

        cc.shutdown();

        if (fr2.isSuccess()) {
          System.out.println("peer online U:" + pa);
        } else {
          System.out.println("offline " + pa);
View Full Code Here

              if (future.isSuccess()) {
                futureDone.done();
              } else {
                futureDone.failed(future);
              }
              channelCreator.shutdown();
            }
          });
        } else {
          futureDone.failed(future);
        }
View Full Code Here

            Assert.assertEquals(1, recv1.trackerStorage().sizeUnverified() + recv1.trackerStorage().size());
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (cc != null) {
                cc.shutdown().awaitListenersUninterruptibly();
            }
            if (sender != null) {
                sender.peer().shutdown().await();
            }
            if (recv1 != null) {
View Full Code Here

            // don't care about the sender
            Assert.assertEquals(0, recv1.peerBean().peerMap().all().size());

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

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

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

            fr.awaitUninterruptibly();
            Assert.assertEquals(true, fr.isSuccess());
            Thread.sleep(WAIT);
        } finally {
            if (cc != null) {
                cc.shutdown().await();
            }
            if (sender != null) {
                sender.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.