use of com.openshift.cloud.api.connector.invoker.ApiClient in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ManagedConnectorServiceApplication method pollSlackConnector.
private Connector pollSlackConnector(Connector connector) throws InterruptedException, ApiException {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath(baseUrl);
HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
Bearer.setBearerToken(bearerToken);
ConnectorsApi connectorsAPI = createConnectorsAPI();
Connector fetchedConnector = connectorsAPI.getConnector(connector.getId(), "");
System.out.println(fetchedConnector.getStatus());
Thread.sleep(5000);
return fetchedConnector;
}
use of com.openshift.cloud.api.connector.invoker.ApiClient in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ManagedConnectorServiceApplication method createConnectorsAPI.
private ConnectorsApi createConnectorsAPI() {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath(baseUrl);
HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
Bearer.setBearerToken(bearerToken);
return new ConnectorsApi(defaultClient);
}
Aggregations