public class BaseClient extends Object implements Client, HttpClientAware
Modifier and Type | Field and Description |
---|---|
static String |
APIS |
protected okhttp3.OkHttpClient |
httpClient |
Constructor and Description |
---|
BaseClient() |
BaseClient(Config config) |
BaseClient(okhttp3.OkHttpClient httpClient,
Config config) |
BaseClient(String masterUrl) |
Modifier and Type | Method and Description |
---|---|
<C> C |
adapt(Class<C> type) |
protected okhttp3.OkHttpClient |
adaptOkHttpClient(okhttp3.OkHttpClient okHttpClient) |
void |
close() |
io.fabric8.kubernetes.api.model.APIGroup |
getApiGroup(String name)
Return a single api group
|
io.fabric8.kubernetes.api.model.APIGroupList |
getApiGroups()
Returns the api groups
|
io.fabric8.kubernetes.api.model.APIResourceList |
getApiResources(String groupVersion)
Return the api resource metadata for the given groupVersion
|
String |
getApiVersion() |
Config |
getConfiguration() |
okhttp3.OkHttpClient |
getHttpClient() |
URL |
getMasterUrl() |
String |
getNamespace() |
protected VersionInfo |
getVersionInfo(String path) |
<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
|
public static final String APIS
protected okhttp3.OkHttpClient httpClient
public BaseClient()
public BaseClient(String masterUrl)
public BaseClient(Config config)
public BaseClient(okhttp3.OkHttpClient httpClient, Config config)
public void close()
public URL getMasterUrl()
getMasterUrl
in interface Client
public String getApiVersion()
getApiVersion
in interface Client
public String getNamespace()
getNamespace
in interface Client
public Config getConfiguration()
getConfiguration
in interface ConfigAware
public okhttp3.OkHttpClient getHttpClient()
getHttpClient
in interface HttpClientAware
public <C> Boolean isAdaptable(Class<C> type)
Client
isAdaptable
in interface Client
C
- The target client type.type
- The target client class.ExtensionAdapter
is found.public io.fabric8.kubernetes.api.model.RootPaths rootPaths()
public boolean supportsApiPath(String apiPath)
Client
supportsApiPath
in interface Client
apiPath
- Path as stringpublic io.fabric8.kubernetes.api.model.APIGroupList getApiGroups()
Client
getApiGroups
in interface Client
APIGroupList
metadatapublic io.fabric8.kubernetes.api.model.APIGroup getApiGroup(String name)
Client
getApiGroup
in interface Client
name
- of the groupAPIGroup
metadatapublic io.fabric8.kubernetes.api.model.APIResourceList getApiResources(String groupVersion)
Client
getApiResources
in interface Client
groupVersion
- the groupVersion - group/versionAPIResourceList
for the groupVersionprotected VersionInfo getVersionInfo(String path)
protected okhttp3.OkHttpClient adaptOkHttpClient(okhttp3.OkHttpClient okHttpClient)
Copyright © 2015–2020 Red Hat. All rights reserved.