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

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


                            Level.FINE,
                            "SDC tunnel registration received: "
                                    + registrationRequest);
                }

                RegistrationResponseV4 registrationResponse = RegistrationResponseV4
                        .newBuilder()
                        .setResult(
                                com.google.dataconnector.protocol.proto.SdcFrame.RegistrationResponseV4.ResultCode.OK)
                        .setServerSuppliedConf(
                                ServerSuppliedConf.newBuilder()
                                        .setHealthCheckTimeout(5000)
                                        .setHealthCheckWakeUpInterval(5000)
                                        .build()).build();

                getFrameSender().sendFrame(FrameInfo.Type.REGISTRATION,
                        registrationResponse.toByteString());
            } else if (frameInfo.getType() == Type.HEALTH_CHECK) {
                HealthCheckInfo healthCheckResponse = HealthCheckInfo
                        .newBuilder()
                        .setSource(Source.SERVER)
                        .setTimeStamp(System.currentTimeMillis())
View Full Code Here


   */
  private void processRegistrationResponse(final FrameInfo frameInfo) throws
      RegistrationException {
    Preconditions.checkNotNull(healthCheckHandler);
    try {
      final RegistrationResponseV4 regResponse = RegistrationResponseV4.parseFrom(
          frameInfo.getPayload());
      if (regResponse.getResult() != RegistrationResponseV4.ResultCode.OK) {
        LOG.fatal("Registration failed: " + regResponse.getStatusMessage());
        throw new RegistrationException("Registration failed");
      }
      LOG.debug("Received response to resource registration request\n" + regResponse.toString());

      if (regResponse.hasServerSuppliedConf()) {
        ServerSuppliedConf serverSuppliedConf = regResponse.getServerSuppliedConf();
        LOG.info("registration successful. Received config info from the SDC server\n" +
            regResponse.getServerSuppliedConf().toString());
        healthCheckHandler.setServerSuppliedConf(serverSuppliedConf);
       
        // Support for session-based encryption:
        if (serverSuppliedConf.hasKeyAlgo() && serverSuppliedConf.hasKeyBytes()) {
          this.sdcKeysManager.storeSessionKey(
View Full Code Here

TOP

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

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.