Package net.tomp2p.p2p.builder

Examples of net.tomp2p.p2p.builder.SendDirectBuilder


            FutureChannelCreator fcc = sender.connectionBean().reservation().create(0, 1);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            SendDirectBuilder sendDirectBuilder = new SendDirectBuilder(sender, (PeerAddress) null);
            sendDirectBuilder.streaming();
            sendDirectBuilder.idleTCPSeconds(Integer.MAX_VALUE);

            byte[] me = new byte[50];
            Buffer b = new Buffer(Unpooled.compositeBuffer(), 100);
            b.addComponent(Unpooled.wrappedBuffer(me));
            if (!wait) {
                ByteBuf replyBuffer = Unpooled.buffer(50);
                replyBuffer.writerIndex(50);
                b.addComponent(replyBuffer);
            }
            sendDirectBuilder.buffer(b);
            sendDirectBuilder.progressListener(new ProgressListener() {
                @Override
                public void progress(final Message interMediateMessage) {
                    if (interMediateMessage.isDone()) {
                        progressComplete.incrementAndGet();
                        System.err.println("progress 1 ? done");
View Full Code Here


            FutureChannelCreator fcc = sender.connectionBean().reservation().create(0, 2);
            fcc.awaitUninterruptibly();
            cc = fcc.channelCreator();

            SendDirectBuilder sendDirectBuilder = new SendDirectBuilder(sender, (PeerAddress) null);
            sendDirectBuilder.object("test");

            FutureResponse fd1 = sender.directDataRPC()
                    .send(recv1.peerAddress(), sendDirectBuilder, cc);
            FutureResponse fd2 = sender.directDataRPC()
                    .send(recv1.peerAddress(), sendDirectBuilder, cc);
View Full Code Here

                FutureChannelCreator fcc = sender.connectionBean().reservation().create(0, 1);
                fcc.awaitUninterruptibly();
                cc = fcc.channelCreator();

                SendDirectBuilder sendDirectBuilder = new SendDirectBuilder(sender, (PeerAddress) null);
                sendDirectBuilder.object((Object) Integer.valueOf(i));

                FutureResponse futureData = sender.directDataRPC().send(recv1.peerAddress(),
                        sendDirectBuilder, cc);
                Utils.addReleaseListener(cc, futureData);
                futureData.addListener(new BaseFutureAdapter<FutureResponse>() {
View Full Code Here

    }

    // -------------------------------------------------- Direct, bootstrap, ping and broadcast  

    public SendDirectBuilder sendDirect(PeerAddress recipientAddress) {
        return new SendDirectBuilder(this, recipientAddress);
    }
View Full Code Here

    public SendDirectBuilder sendDirect(PeerAddress recipientAddress) {
        return new SendDirectBuilder(this, recipientAddress);
    }

    public SendDirectBuilder sendDirect(FuturePeerConnection recipientConnection) {
        return new SendDirectBuilder(this, recipientConnection);
    }
View Full Code Here

    public SendDirectBuilder sendDirect(FuturePeerConnection recipientConnection) {
        return new SendDirectBuilder(this, recipientConnection);
    }
   
    public SendDirectBuilder sendDirect(PeerConnection peerConnection) {
        return new SendDirectBuilder(this, peerConnection);
    }
View Full Code Here

TOP

Related Classes of net.tomp2p.p2p.builder.SendDirectBuilder

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.