@Override protected AbstractCallbackNotifier<PushResponseItem> callbackNotifier(PushImageCmd command, ResultCallback<PushResponseItem> resultCallback) { WebTarget webResource = getBaseResource().path("/images/" + name(command) + "/push").queryParam("tag", command.getTag()); LOGGER.trace("POST: {}", webResource); Builder builder = resourceWithAuthConfig(command.getAuthConfig(), webResource.request()) .accept(MediaType.APPLICATION_JSON); return new POSTCallbackNotifier<PushResponseItem>(new JsonStreamProcessor<PushResponseItem>( PushResponseItem.class), resultCallback, builder, entity(null, MediaType.APPLICATION_JSON)); } }
@Override protected Void execute0(PushImageCmd command, ResultCallback<PushResponseItem> resultCallback) { WebTarget webResource = getBaseResource().path("/images/" + name(command) + "/push").queryParam("tag", command.getTag()); LOGGER.trace("POST: {}", webResource); InvocationBuilder builder = resourceWithAuthConfig(command.getAuthConfig(), webResource.request()) .accept(MediaType.APPLICATION_JSON); builder.post(null, new TypeReference<PushResponseItem>() { }, resultCallback); return null; } }
@Override protected AbstractCallbackNotifier<PushResponseItem> callbackNotifier(PushImageCmd command, ResultCallback<PushResponseItem> resultCallback) { WebTarget webResource = getBaseResource().path("/images/" + name(command) + "/push").queryParam("tag", command.getTag()); LOGGER.trace("POST: {}", webResource); Builder builder = resourceWithAuthConfig(command.getAuthConfig(), webResource.request()) .accept(MediaType.APPLICATION_JSON); return new POSTCallbackNotifier<PushResponseItem>(new JsonStreamProcessor<PushResponseItem>( PushResponseItem.class), resultCallback, builder, entity(null, MediaType.APPLICATION_JSON)); } }
@Override protected Void execute0(PushImageCmd command, ResultCallback<PushResponseItem> resultCallback) { WebTarget webResource = getBaseResource().path("/images/" + name(command) + "/push").queryParam("tag", command.getTag()); LOGGER.trace("POST: {}", webResource); InvocationBuilder builder = resourceWithAuthConfig(command.getAuthConfig(), webResource.request()) .accept(MediaType.APPLICATION_JSON); builder.post(null, new TypeReference<PushResponseItem>() { }, resultCallback); return null; } }