Beispiel #1
0
 private String execute(BeanstalkProtocol.Command command, byte[] data, Object... args) {
   try {
     String commandAsString = command.get(args);
     log.info("Command as String: {}", commandAsString);
     ByteArrayOutputStream buf = new ByteArrayOutputStream();
     buf.write(commandAsString.getBytes());
     buf.write(data);
     buf.write("\r\n".getBytes());
     return execute(command, buf.toByteArray());
   } catch (Exception x) {
     throw new BeanstalkException(x);
   }
 }
Beispiel #2
0
 private String execute(BeanstalkProtocol.Command command, Object... args) {
   String commandAsString = command.get(args);
   log.info("Command as String: {}", commandAsString);
   return execute(command, commandAsString.getBytes());
 }