Esempio n. 1
0
 public Response executeCommand(ICommand command, Builder<?> builder, long timeout) {
   ByteString payload = (builder != null) ? builder.build().toByteString() : ByteString.EMPTY;
   Command.Builder commandBuilder = buildCommand(command, payload);
   int tag = commandBuilder.getTag();
   connection.send(commandBuilder.build());
   return waitForResponse(tag, timeout);
 }
Esempio n. 2
0
 @Override
 @SuppressWarnings("unchecked")
 public A parseData(Data data) throws Exception {
   return (A) data.merge(builder.clone()).build();
 }
Esempio n. 3
0
 public BuilderParser(Builder builder) {
   this.builder = builder.clone().clear();
 }