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.OkHttpClient
httpClient
-
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> C
adapt(Class<C> type)
void
close()
String
getApiVersion()
Config
getConfiguration()
okhttp3.OkHttpClient
getHttpClient()
URL
getMasterUrl()
String
getNamespace()
<C> Boolean
isAdaptable(Class<C> type)
Checks if the client can be adapted to an other client type.io.fabric8.kubernetes.api.model.RootPaths
rootPaths()
boolean
supportsApiPath(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:
getMasterUrl
in interfaceClient
-
getApiVersion
public String getApiVersion()
- Specified by:
getApiVersion
in interfaceClient
-
getNamespace
public String getNamespace()
- Specified by:
getNamespace
in interfaceClient
-
getConfiguration
public Config getConfiguration()
- Specified by:
getConfiguration
in interfaceConfigAware
-
getHttpClient
public okhttp3.OkHttpClient getHttpClient()
- Specified by:
getHttpClient
in interfaceHttpClientAware
-
isAdaptable
public <C> Boolean isAdaptable(Class<C> type)
Description copied from interface:Client
Checks if the client can be adapted to an other client type.- Specified by:
isAdaptable
in interfaceClient
- Type Parameters:
C
- The target client type.- Parameters:
type
- The target client class.- Returns:
- Returns true if a working
ExtensionAdapter
is found.
-
rootPaths
public io.fabric8.kubernetes.api.model.RootPaths rootPaths()
-
supportsApiPath
public boolean supportsApiPath(String apiPath)
Description copied from interface:Client
Returns true if this cluster supports the given API path or API Group ID- Specified by:
supportsApiPath
in interfaceClient
- Parameters:
apiPath
- Path as string- Returns:
- returns boolean value indicating whether it supports.
-
-