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

Examples of com.google.dataconnector.protocol.proto.SdcFrame.FetchReply


     *            The SDC frame to parse.
     */
    public void dispatch(FrameInfo frameInfo) throws FramingException {
        try {
            if (frameInfo.getType() == Type.FETCH_REQUEST) {
                FetchReply fetchReply = FetchReply.parseFrom(frameInfo
                        .getPayload());

                if (getLogger().isLoggable(Level.FINE)) {
                    getLogger().log(Level.FINE,
                            "SDC response received: " + fetchReply.toString());
                }

                // Lookup the associated SDC request
                SdcClientCall call = getCalls().get(fetchReply.getId());

                if (call != null) {
                    call.setFetchReply(fetchReply);

                    // Unblock the client thread
View Full Code Here


      SdcKeysManager sm = new SdcKeysManager();
      sm.storeSessionKey(sessionId,
          SessionEncryption.JCE_ALGO, SessionEncryption.newKeyBytes());

      FetchReply reply = FetchReply.newBuilder()
        .setId(UUID.randomUUID().toString())
        .setStatus(0).build();
     
      FetchRequestHandler handler = new FetchRequestHandler(
          sm,
          EasyMock.createMock(ThreadPoolExecutor.class),
          EasyMock.createMock(Injector.class),
          EasyMock.createMock(ClockUtil.class));
     
      FrameInfo frame = sm.getSessionEncryption().toFrameInfo(
          FrameInfo.Type.FETCH_REQUEST, reply);
     
      assertTrue(frame.hasSessionId());
      assertEquals(reply.toByteString(), sm.getSessionEncryption().decrypt(frame.getPayload()));
    }
View Full Code Here

    @Override
    public FetchReply call() {
      // Initialize the reply, etc.
      StatusCode statusCode = StatusCode.OK;
      FetchReply.Builder replyBuilder = FetchReply.newBuilder();
      FetchReply reply = null;

      replyBuilder.setId(request.getId());

      Exception exception = null;
      try {
View Full Code Here

TOP

Related Classes of com.google.dataconnector.protocol.proto.SdcFrame.FetchReply

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.