Class ClientUtil
- java.lang.Object
-
- com.google.jenkins.plugins.k8sengine.client.ClientUtil
-
public class ClientUtil extends Object
Utilities for using the gcp-plugin-core clients.
-
-
Constructor Summary
Constructors Constructor Description ClientUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.cloud.graphite.platforms.plugin.client.ClientFactory
getClientFactory(ItemGroup itemGroup, com.google.common.collect.ImmutableList<com.cloudbees.plugins.credentials.domains.DomainRequirement> domainRequirements, String credentialsId, Optional<com.google.api.client.http.HttpTransport> transport)
Creates aClientFactory
for generating the GCP api clients.static com.google.cloud.graphite.platforms.plugin.client.ClientFactory
getClientFactory(ItemGroup itemGroup, String credentialsId)
Creates aClientFactory
for generating the GCP api clients.
-
-
-
Method Detail
-
getClientFactory
public static com.google.cloud.graphite.platforms.plugin.client.ClientFactory getClientFactory(ItemGroup itemGroup, com.google.common.collect.ImmutableList<com.cloudbees.plugins.credentials.domains.DomainRequirement> domainRequirements, String credentialsId, Optional<com.google.api.client.http.HttpTransport> transport) throws AbortException
Creates aClientFactory
for generating the GCP api clients.- Parameters:
itemGroup
- The Jenkins context to use for retrieving the credentials.domainRequirements
- A list of domain requirements. Must be non-null.credentialsId
- The ID of the credentials to use for generating clients.transport
- AnOptional
parameter that specifies theHttpTransport
to use. A default will be used if unspecified.- Returns:
- A
ClientFactory
to get clients. - Throws:
AbortException
- If there was an error initializing the ClientFactory.
-
getClientFactory
public static com.google.cloud.graphite.platforms.plugin.client.ClientFactory getClientFactory(ItemGroup itemGroup, String credentialsId) throws AbortException
Creates aClientFactory
for generating the GCP api clients.- Parameters:
itemGroup
- The Jenkins context to use for retrieving the credentials.credentialsId
- The ID of the credentials to use for generating clients.- Returns:
- A
ClientFactory
to get clients. - Throws:
AbortException
- If there was an error initializing the ClientFactory.
-
-