com.capitalone.dashboard.collector.DefaultChatOpsClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chat-ops-collector Show documentation
Show all versions of chat-ops-collector Show documentation
ChatOps Collector Microservice
The newest version!
package com.capitalone.dashboard.collector;
import com.capitalone.dashboard.util.Supplier;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestOperations;
/**
* ChatOpsClient
*/
@Component
public class DefaultChatOpsClient implements ChatOpsClient {
private final RestOperations restOperations;
@Autowired
public DefaultChatOpsClient(Supplier restOperationsSupplier) {
this.restOperations = restOperationsSupplier.get();
}
@SuppressWarnings("unused")
private ResponseEntity makeRestCall(String url) {
return restOperations.exchange(url, HttpMethod.GET, null, String.class);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy