Examples of toByteString()


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

      sm.storeSessionKey(sessionId,
          SessionEncryption.JCE_ALGO, SessionEncryption.newKeyBytes());
   
    FrameInfo frameInfo = FrameInfo.newBuilder()
      .setSessionId(sessionId)
      .setPayload(sm.getSessionEncryption().encrypt(request.toByteString())).build();

    FetchRequestHandler handler = new FetchRequestHandler(
        sm,
        EasyMock.createMock(ThreadPoolExecutor.class),
        EasyMock.createMock(Injector.class),
View Full Code Here

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

                                            + healthCheckResponse);
                }

                // Reply to the check
                getFrameSender().sendFrame(Type.HEALTH_CHECK,
                        healthCheckResponse.toByteString());
            } else if (getLogger().isLoggable(Level.FINE)) {
                getLogger().log(Level.FINE,
                        "Unexpected SDC frame received: " + frameInfo);
            }
        } catch (InvalidProtocolBufferException e) {
View Full Code Here

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

      // finalize the building of the RegRequest
      final RegistrationRequestV4 regRequest = regRequestBuilder.build();

      // Send frame.
      LOG.info("Sending resources info\n" + regRequest.toString());
      frameSender.sendFrame(FrameInfo.Type.REGISTRATION, regRequest.toByteString());

      // store the resource keys
      sdcKeysManager.storeSecretKeys(regRequest.getResourceKeyList());
    } catch (IOException e) {
      throw new RegistrationException(e);
View Full Code Here

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

                                        .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

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

Examples of com.google.protobuf.ByteString.Output.toByteString()

                                     .setName( entry.getKey().getClass().getName() );
            Context ctx = context.strategyContext.get( entry.getKey() );
            if( ctx != null ) {
                Output os = ByteString.newOutput();
                ctx.write( new DroolsObjectOutputStream( os ) );
                _strat.setData( os.toByteString() );
                os.close();
            }
            _header.addStrategy( _strat.build() );
        }
    }
View Full Code Here

Examples of com.google.protobuf.ByteString.Output.toByteString()

                                     .setName( entry.getKey().getClass().getName() );
            Context ctx = context.strategyContext.get( entry.getKey() );
            if( ctx != null ) {
                Output os = ByteString.newOutput();
                ctx.write( new DroolsObjectOutputStream( os ) );
                _strat.setData( os.toByteString() );
                os.close();
            }
            _header.addStrategy( _strat.build() );
        }
    }
View Full Code Here

Examples of com.google.protobuf.ByteString.Output.toByteString()

                                     .setName( entry.getKey().getClass().getName() );
            Context ctx = context.strategyContext.get( entry.getKey() );
            if( ctx != null ) {
                Output os = ByteString.newOutput();
                ctx.write( new DroolsObjectOutputStream( os ) );
                _strat.setData( os.toByteString() );
                os.close();
            }
            _header.addStrategy( _strat.build() );
        }
    }
View Full Code Here

Examples of com.google.protobuf.ByteString.Output.toByteString()

                                     .setName( entry.getKey().getClass().getName() );
            Context ctx = context.strategyContext.get( entry.getKey() );
            if( ctx != null ) {
                Output os = ByteString.newOutput();
                ctx.write( new DroolsObjectOutputStream( os ) );
                _strat.setData( os.toByteString() );
                os.close();
            }
            _header.addStrategy( _strat.build() );
        }
    }
View Full Code Here

Examples of com.google.protobuf.Message.toByteString()

          CoprocessorServiceResponse.newBuilder();
      builder.setRegion(RequestConverter.buildRegionSpecifier(
          RegionSpecifierType.REGION_NAME, region.getRegionName()));
      builder.setValue(
          builder.getValueBuilder().setName(result.getClass().getName())
              .setValue(result.toByteString()));
      return builder.build();
    } catch (IOException ie) {
      throw new ServiceException(ie);
    }
  }
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.