public interface IClient extends ICapable, Cloneable
| Modifier and Type | Method and Description |
|---|---|
default <T> T |
adapt(Class<T> klass)
Adapt this class to the given type
|
IClient |
clone() |
Collection<IResource> |
create(IList list,
String namespace)
Creates a list of resources in the given namespace
|
<T extends IResource> |
create(String kind,
String namespace,
String name,
String subresource,
IResource payload)
Creates the given resource in the given namespace using the subresource
|
<T extends IResource> |
create(String kind,
String version,
String namespace,
String name,
String subresource,
InputStream payload)
Creates the given resource in the given namespace using the subresource
|
<T extends IResource> |
create(String kind,
String version,
String namespace,
String name,
String subresource,
InputStream payload,
Map<String,String> parameters)
Creates the given resource in the given namespace using the subresource
|
<T extends IResource> |
create(T resource)
Creates the given resource in the namespace defined on the resource or the
default namspace if undefined
|
<T extends IResource> |
create(T resource,
String namespace)
Creates the given resource in the given namespace
|
void |
delete(String kind,
String namespace,
String name)
Deletes a resource of given name and kind in the given namespace.
|
<T extends IResource> |
delete(T resource)
Deletes the given resource.
|
<T> T |
execute(ITypeFactory factory,
String httpMethod,
String kind,
String namespace,
String name,
String subresource,
String subContext,
JSONSerializeable payload,
Map<String,String> params) |
<T extends IResource> |
execute(String httpMethod,
String kind,
String namespace,
String name,
String subresource,
IResource payload)
Raw execution of a request
|
<T extends IResource> |
execute(String httpMethod,
String kind,
String namespace,
String name,
String subresource,
IResource payload,
Map<String,String> params)
Raw execution of a request
|
<T extends IResource> |
execute(String httpMethod,
String kind,
String namespace,
String name,
String subresource,
IResource payload,
String subcontext)
Raw execution of a request
|
<T extends IResource> |
execute(String method,
String kind,
String version,
String namespace,
String name,
String subresource,
InputStream payload) |
<T extends IResource> |
execute(String method,
String kind,
String version,
String namespace,
String name,
String subresource,
InputStream payload,
Map<String,String> parameters) |
IList |
get(String kind,
String namespace) |
<T extends IResource> |
get(String kind,
String name,
String namespace) |
IAuthorizationContext |
getAuthorizationContext()
The authorization context for this client.
|
URL |
getAuthorizationEndpoint() |
URL |
getBaseURL() |
String |
getKubernetesMasterVersion()
Query the server to determine the Kubernetes version
|
String |
getOpenShiftAPIVersion()
Returns the OpenShift API version for this client
|
String |
getOpenshiftMasterVersion()
Query the server to determine the Openshift version
|
IResourceFactory |
getResourceFactory()
Returns the resource factory used to create resources based on the response
from the server
|
String |
getResourceURI(IResource resource) |
String |
getServerReadyStatus()
Query the server to determine if it is ready
|
URL |
getTokenEndpoint() |
<T extends IResource> |
list(String kind)
Lists all possible resources of the given kind in the default namespace
|
<T extends IResource> |
list(String kind,
Map<String,String> labels)
Lists the given given resource kind scoping it to a specific namespace
|
<T extends IResource> |
list(String kind,
String namespace)
Lists the given given resource kind scoping it to a specific namespace
|
<T extends IResource> |
list(String kind,
String namespace,
Map<String,String> labels)
Lists the given given resource kind scoping it to a specific namespace
|
<T extends IResource> |
list(String kind,
String namespace,
String labelQuery)
Lists the given given resource kind scoping it to a specific namespace
|
<T extends IResource> |
update(T resource)
Updates the given resource
|
IWatcher |
watch(IOpenShiftWatchListener listener,
String... kinds) |
IWatcher |
watch(String namespace,
IOpenShiftWatchListener listener,
String... kinds) |
accept, getCapability, supportsIWatcher watch(String namespace, IOpenShiftWatchListener listener, String... kinds)
IWatcher watch(IOpenShiftWatchListener listener, String... kinds)
<T extends IResource> List<T> list(String kind)
kind - <T extends IResource> List<T> list(String kind, Map<String,String> labels)
kind - labels - The label used to filter the resource<T extends IResource> List<T> list(String kind, String namespace)
kind - namespace - The namespace to scope the possible results of this list<T extends IResource> List<T> list(String kind, String namespace, Map<String,String> labels)
kind - namespace - The namespace to scope the possible results of this listlabels - The label used to filter the resource<T extends IResource> List<T> list(String kind, String namespace, String labelQuery)
kind - namespace - The namespace to scope the possible results of this listlabelQuery - The label used to filter the resource<T extends IResource> T get(String kind, String name, String namespace)
kind - name - namespace - OpenShiftException - if operation not supported for resource typeIList get(String kind, String namespace)
<T extends IResource> T create(T resource)
resource - UnsupportedOperationException - if the resource is a list<T extends IResource> T create(T resource, String namespace)
resource - namespace - <T extends IResource> T create(String kind, String namespace, String name, String subresource, IResource payload)
kind - namespace - name - subresource - payload - <T extends IResource> T create(String kind, String version, String namespace, String name, String subresource, InputStream payload)
kind - version - namespace - name - subresource - payload - <T extends IResource> T create(String kind, String version, String namespace, String name, String subresource, InputStream payload, Map<String,String> parameters)
kind - version - namespace - name - subresource - payload - parameters - Collection<IResource> create(IList list, String namespace)
list - The resource definitionsnamespace - the namespace for the resourcesOpenShiftException - if a status can not be determined from the exception<T extends IResource> T update(T resource)
resource - UnsupportedOperationException - if the resource is a list<T extends IResource> void delete(T resource)
resource - UnsupportedOperationException - if the resource is a listvoid delete(String kind, String namespace, String name)
kind - the kind of resourcenamespace - the namespacename - the name of the resourceUnsupportedOperationException - if the resource is a list<T extends IResource> T execute(String httpMethod, String kind, String namespace, String name, String subresource, IResource payload)
httpMethod - HttpMethod (e.g. POST)kind - namespace - name - subresource - subresource or capabilitypayload - the payload to sumit. only valid on non-get operations<T extends IResource> T execute(String method, String kind, String version, String namespace, String name, String subresource, InputStream payload)
<T extends IResource> T execute(String method, String kind, String version, String namespace, String name, String subresource, InputStream payload, Map<String,String> parameters)
<T extends IResource> T execute(String httpMethod, String kind, String namespace, String name, String subresource, IResource payload, Map<String,String> params)
httpMethod - HttpMethod (e.g. POST)kind - namespace - name - subresource - subresource or capabilitypayload - the payload to sumit. only valid on non-get operationsparams - map of query parameters<T extends IResource> T execute(String httpMethod, String kind, String namespace, String name, String subresource, IResource payload, String subcontext)
httpMethod - HttpMethod (e.g. POST)kind - namespace - name - subresource - subresource or capabilitysubcontext - additional subContext (e.g. jolokia endpoint) Raw execution of a
request that requires consumers to handle the response<T> T execute(ITypeFactory factory, String httpMethod, String kind, String namespace, String name, String subresource, String subContext, JSONSerializeable payload, Map<String,String> params)
factory - The factory to use for interpreting the responsehttpMethod - HttpMethod (e.g. POST)kind - namespace - name - subresource - subresource or capabilitypayload - the payload to sumit. only valid on non-get operationssubContext - additional subContextparams - URL getBaseURL()
URL getAuthorizationEndpoint()
URL getTokenEndpoint()
String getResourceURI(IResource resource)
String getOpenShiftAPIVersion() throws UnsupportedVersionException
{@link - UnauthorizedException}UnsupportedVersionExceptionIAuthorizationContext getAuthorizationContext()
IResourceFactory getResourceFactory()
default <T> T adapt(Class<T> klass)
String getServerReadyStatus()
String getOpenshiftMasterVersion()
String getKubernetesMasterVersion()
IClient clone()
Copyright © 2019 Red Hat, Inc. All Rights Reserved.