All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nepxion.discovery.console.rest.VersionUpdateRestInvoker Maven / Gradle / Ivy

There is a newer version: 6.22.0
Show newest version
package com.nepxion.discovery.console.rest;

/**
 * 

Title: Nepxion Discovery

*

Description: Nepxion Discovery

*

Copyright: Copyright (c) 2017-2050

*

Company: Nepxion

* @author Haojun Ren * @version 1.0 */ import java.util.List; import org.springframework.cloud.client.ServiceInstance; import org.springframework.web.client.RestTemplate; public class VersionUpdateRestInvoker extends AbstractRestInvoker { private String version; public VersionUpdateRestInvoker(List serviceInstances, RestTemplate restTemplate, String version, boolean async) { super(serviceInstances, restTemplate, async); this.version = version; } @Override protected String getInfo() { return "Version updated"; } @Override protected String getSuffixPath() { return "version/update-" + getInvokeType(); } @Override protected String doRest(String url) { return restTemplate.postForEntity(url, version, String.class).getBody(); } @Override protected void checkPermission(ServiceInstance serviceInstance) throws Exception { checkDiscoveryControlPermission(serviceInstance); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy