Package com.alibaba.dubbo.remoting.buffer

Examples of com.alibaba.dubbo.remoting.buffer.ChannelBuffer.readableBytes()


           
            Object msg = context.getMessage();
            codec.encode(channel, channelBuffer, msg);
           
            GrizzlyChannel.removeChannelIfDisconnectd(connection);
            Buffer buffer = connection.getTransport().getMemoryManager().allocate(channelBuffer.readableBytes());
            buffer.put(channelBuffer.toByteBuffer());
            buffer.flip();
            buffer.allowBufferDispose(true);
            context.setMessage(buffer);
        } finally {
View Full Code Here


        Channel channel = isServerside? getServerSideChannel(url) : getCliendSideChannel(url);

        ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(1024);

        codec.encode(channel, buffer, request);
        byte[] data = new byte[buffer.readableBytes()];
        buffer.readBytes(data);

        Assert.assertEquals(ret.length, data.length);
        for(int i=0;i<ret.length;i++){
            if (ret[i] != data[i]){
View Full Code Here

        ChannelBuffer output = ChannelBuffers.dynamicBuffer(1024);

        codec.encode( channel, output, request );

        byte[] bytes = new byte[output.readableBytes()];
        output.readBytes(bytes);

        ByteArrayInputStream bis = new ByteArrayInputStream( bytes );

        TTransport transport = new TIOStreamTransport( bis );
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.