Package io.fabric8.kubernetes.client
Class BaseClient
- java.lang.Object
-
- io.fabric8.kubernetes.client.BaseClient
-
- All Implemented Interfaces:
Client,ConfigAware,HttpClientAware,Closeable,AutoCloseable
- Direct Known Subclasses:
AdmissionRegistrationAPIGroupClient,ApiextensionsAPIGroupClient,AppsAPIGroupClient,AuthorizationAPIGroupClient,AutoscalingAPIGroupClient,BatchAPIGroupClient,CertificatesAPIGroupClient,DefaultKubernetesClient,DiscoveryAPIGroupClient,ExtensionsAPIGroupClient,ManagedKubernetesClient,MetricAPIGroupClient,NetworkAPIGroupClient,PolicyAPIGroupClient,RbacAPIGroupClient,SchedulingAPIGroupClient,StorageAPIGroupClient,V1AdmissionRegistrationAPIGroupClient,V1ApiextensionsAPIGroupClient,V1APIGroupClient,V1AuthorizationAPIGroupClient,V1AutoscalingAPIGroupClient,V1beta1AdmissionRegistrationAPIGroupClient,V1beta1ApiextensionsAPIGroupClient,V1beta1AuthorizationAPIGroupClient,V1beta1CertificatesAPIGroupClient,V1beta1DiscoveryAPIGroupClient,V1beta1NetworkAPIGroupClient,V1beta1SchedulingAPIGroupClient,V1CertificatesAPIGroupClient,V1NetworkAPIGroupClient,V1SchedulingAPIGroupClient,V2beta1AutoscalingAPIGroupClient,V2beta2AutoscalingAPIGroupClient
public abstract class BaseClient extends Object implements Client, HttpClientAware
-
-
Field Summary
Fields Modifier and Type Field Description protected okhttp3.OkHttpClienthttpClient
-
Constructor Summary
Constructors Constructor Description BaseClient()BaseClient(Config config)BaseClient(String masterUrl)BaseClient(okhttp3.OkHttpClient httpClient, Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C> Cadapt(Class<C> type)voidclose()StringgetApiVersion()ConfiggetConfiguration()okhttp3.OkHttpClientgetHttpClient()URLgetMasterUrl()StringgetNamespace()<C> BooleanisAdaptable(Class<C> type)Checks if the client can be adapted to an other client type.io.fabric8.kubernetes.api.model.RootPathsrootPaths()booleansupportsApiPath(String apiPath)Returns true if this cluster supports the given API path or API Group ID
-
-
-
Method Detail
-
close
public void close()
-
getMasterUrl
public URL getMasterUrl()
- Specified by:
getMasterUrlin interfaceClient
-
getApiVersion
public String getApiVersion()
- Specified by:
getApiVersionin interfaceClient
-
getNamespace
public String getNamespace()
- Specified by:
getNamespacein interfaceClient
-
getConfiguration
public Config getConfiguration()
- Specified by:
getConfigurationin interfaceConfigAware
-
getHttpClient
public okhttp3.OkHttpClient getHttpClient()
- Specified by:
getHttpClientin interfaceHttpClientAware
-
isAdaptable
public <C> Boolean isAdaptable(Class<C> type)
Description copied from interface:ClientChecks if the client can be adapted to an other client type.- Specified by:
isAdaptablein interfaceClient- Type Parameters:
C- The target client type.- Parameters:
type- The target client class.- Returns:
- Returns true if a working
ExtensionAdapteris found.
-
rootPaths
public io.fabric8.kubernetes.api.model.RootPaths rootPaths()
-
supportsApiPath
public boolean supportsApiPath(String apiPath)
Description copied from interface:ClientReturns true if this cluster supports the given API path or API Group ID- Specified by:
supportsApiPathin interfaceClient- Parameters:
apiPath- Path as string- Returns:
- returns boolean value indicating whether it supports.
-
-