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

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


                AuthorizationInfo authorizationResponse = AuthorizationInfo
                        .newBuilder().setResult(ResultCode.OK).build();

                getFrameSender().sendFrame(FrameInfo.Type.AUTHORIZATION,
                        authorizationResponse.toByteString());

                // Register frame dispatchers
                getFrameReceiver().registerDispatcher(Type.FETCH_REQUEST, this);
                getFrameReceiver().registerDispatcher(Type.REGISTRATION, this);
                getFrameReceiver().registerDispatcher(Type.HEALTH_CHECK, this);
View Full Code Here


    AuthorizationInfo authInfoResponse = AuthorizationInfo.newBuilder()
        .setResult(AuthorizationInfo.ResultCode.OK)
        .build();
    FrameInfo frameInfoResponse = FrameInfo.newBuilder()
        .setType(FrameInfo.Type.AUTHORIZATION)
        .setPayload(authInfoResponse.toByteString())
        .build();

    mockFrameReceiver = EasyMock.createMock(FrameReceiver.class);
    mockFrameReceiver.readOneFrame();
    EasyMock.expectLastCall().andReturn(frameInfoResponse);
View Full Code Here

    AuthorizationInfo authInfoResponse = AuthorizationInfo.newBuilder()
        .setResult(AuthorizationInfo.ResultCode.ACCESS_DENIED)
        .build();
    FrameInfo frameInfoResponse = FrameInfo.newBuilder()
        .setType(FrameInfo.Type.AUTHORIZATION)
        .setPayload(authInfoResponse.toByteString())
        .build();

    mockFrameReceiver = EasyMock.createMock(FrameReceiver.class);
    mockFrameReceiver.readOneFrame();
    EasyMock.expectLastCall().andReturn(frameInfoResponse);
View Full Code Here

      final AuthorizationInfo authInfoRequest = AuthorizationInfo.newBuilder()
          .setEmail(localConf.getUser() + "@" + localConf.getDomain())
          .setPassword(localConf.getPassword())
          .build();
      final FrameInfo authReqRawFrame = FrameInfo.newBuilder()
          .setPayload(authInfoRequest.toByteString())
          .setType(FrameInfo.Type.AUTHORIZATION)
          .build();
      frameSender.sendFrame(authReqRawFrame);
      final FrameInfo authRespRawFrame = frameReceiver.readOneFrame();
      final AuthorizationInfo authInfoResponse = AuthorizationInfo.parseFrom(
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.