Package com.google.dataconnector.protocol.proto.SdcFrame

Examples of com.google.dataconnector.protocol.proto.SdcFrame.SocketDataInfo.toByteString()


        .setSegment(ByteString.copyFromUtf8(DATA))
        .build();
    FrameInfo continuingFrame = FrameInfo.newBuilder()
        .setType(FrameInfo.Type.SOCKET_DATA)
        .setSequence(1)
        .setPayload(continuingSocketDataInfo.toByteString())
        .build();

    // Execute.
    SocksDataHandler socksDataHandler = new SocksDataHandler(fakeLocalConf,
        socketFactory, localHostAddress, threadPoolExecutor, injector);
View Full Code Here


        .setSegment(ByteString.copyFrom(expectedPayload))
        .setState(SocketDataInfo.State.CONTINUE)
        .build();
    FrameInfo expectedContinueFrame = FrameInfo.newBuilder()
        .setType(FrameInfo.Type.SOCKET_DATA)
        .setPayload(expectedContinueSdi.toByteString())
        .build();

    SocketDataInfo expectedClosingSdi = SocketDataInfo.newBuilder()
        .setConnectionId(CONNECTION_ID)
        .setState(SocketDataInfo.State.CLOSE)
View Full Code Here

        .setConnectionId(CONNECTION_ID)
        .setState(SocketDataInfo.State.CLOSE)
        .build();
    FrameInfo expectedClosingFrame = FrameInfo.newBuilder()
        .setType(Type.SOCKET_DATA)
        .setPayload(expectedClosingSdi.toByteString())
        .build();

    MockConnectionRemover connectionRemover = new MockConnectionRemover();

    InputStreamConnector inputStreamConnector = new InputStreamConnector();
View Full Code Here

        .setConnectionId(CONNECTION_ID)
        .setState(SocketDataInfo.State.CLOSE)
        .build();
    FrameInfo expectedClosingFrame = FrameInfo.newBuilder()
        .setType(Type.SOCKET_DATA)
        .setPayload(expectedClosingSdi.toByteString())
        .build();

    InputStream mockIs = EasyMock.createMock(InputStream.class);
    EasyMock.expect(mockIs.read(EasyMock.isA(byte[].class)))
        .andThrow(new IOException("read error"));
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.