@Override
 public void bindToRequest(HttpRequest request, Object toBind) {
   checkArgument(toBind instanceof String, "this binder is only valid for Strings!");
   super.bindToRequest(
       request,
       ImmutableMap.of("server", ImmutableMap.of("adminPass", checkNotNull(toBind, "adminPass"))));
 }
Пример #2
0
 @Override
 public <R extends HttpRequest> R bindToRequest(R request, Object input) {
   return jsonBinder.bindToRequest(request, input);
 }
 @Override
 public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
   Map<String, String> image = Maps.newHashMap();
   if (imageRef != null) image.put("imageRef", imageRef);
   return jsonBinder.bindToRequest(request, ImmutableMap.of("rebuild", image));
 }