public class BaseClient extends SimpleClientContext implements Client
Modifier and Type | Field and Description |
---|---|
static String |
APIS |
config, httpClient
Constructor and Description |
---|
BaseClient() |
BaseClient(ClientContext clientContext) |
BaseClient(Config config) |
BaseClient(HttpClient httpClient,
Config config) |
BaseClient(String masterUrl) |
Modifier and Type | Method and Description |
---|---|
<C> C |
adapt(Class<C> type) |
protected void |
adaptState()
For subclasses to adapt the client state
|
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() |
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.
|
protected SimpleClientContext |
newState(Config updated) |
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
|
getConfiguration, getHttpClient
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHttpClient
getConfiguration
public static final String APIS
public BaseClient()
public BaseClient(String masterUrl)
public BaseClient(Config config)
public BaseClient(HttpClient httpClient, Config config)
public BaseClient(ClientContext clientContext)
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 <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 void adaptState()
protected SimpleClientContext newState(Config updated)
Copyright © 2015–2022 Red Hat. All rights reserved.