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,AppsAPIGroupClient,AutoscalingAPIGroupClient,BatchAPIGroupClient,DefaultKubernetesClient,ExtensionsAPIGroupClient,ManagedKubernetesClient,MetricAPIGroupClient,NetworkAPIGroupClient,PolicyAPIGroupClient,RbacAPIGroupClient,SchedulingAPIGroupClient,SettingsAPIGroupClient,StorageAPIGroupClient,V1AdmissionRegistrationAPIGroupClient,V1APIGroupClient,V1AutoscalingAPIGroupClient,V1beta1AdmissionRegistrationAPIGroupClient,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
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
-
Field Details
-
httpClient
protected okhttp3.OkHttpClient httpClient
-
-
Constructor Details
-
BaseClient
- Throws:
KubernetesClientException
-
BaseClient
- Throws:
KubernetesClientException
-
BaseClient
- Throws:
KubernetesClientException
-
BaseClient
- Throws:
KubernetesClientException
-
-
Method Details
-
close
public void close() -
getMasterUrl
- Specified by:
getMasterUrlin interfaceClient
-
getApiVersion
- Specified by:
getApiVersionin interfaceClient
-
getNamespace
- Specified by:
getNamespacein interfaceClient
-
getConfiguration
- Specified by:
getConfigurationin interfaceConfigAware
-
getHttpClient
public okhttp3.OkHttpClient getHttpClient()- Specified by:
getHttpClientin interfaceHttpClientAware
-
isAdaptable
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.
-
adapt
-
rootPaths
public io.fabric8.kubernetes.api.model.RootPaths rootPaths() -
supportsApiPath
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.
-