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 Clientpublic String getApiVersion()
getApiVersion in interface Clientpublic String getNamespace()
getNamespace in interface Clientpublic Config getConfiguration()
getConfiguration in interface ConfigAwarepublic okhttp3.OkHttpClient getHttpClient()
getHttpClient in interface HttpClientAwarepublic <C> Boolean isAdaptable(Class<C> type)
ClientisAdaptable in interface ClientC - 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)
ClientsupportsApiPath in interface ClientapiPath - Path as stringpublic io.fabric8.kubernetes.api.model.APIGroupList getApiGroups()
ClientgetApiGroups in interface ClientAPIGroupList metadatapublic io.fabric8.kubernetes.api.model.APIGroup getApiGroup(String name)
ClientgetApiGroup in interface Clientname - of the groupAPIGroup metadatapublic io.fabric8.kubernetes.api.model.APIResourceList getApiResources(String groupVersion)
ClientgetApiResources in interface ClientgroupVersion - 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.