public class BaseOperation<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D extends io.fabric8.kubernetes.api.model.Doneable<T>,R extends Resource<T,D>> extends Object implements Operation<T,L,D,R>, NonNamespaceOperation<T,L,D,R>, CreateWatchListDeleteable<T,L,D>, Resource<T,D>
| Modifier and Type | Field and Description |
|---|---|
protected static com.fasterxml.jackson.databind.ObjectMapper |
mapper |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseOperation(com.ning.http.client.AsyncHttpClient httpClient,
URL rootUrl,
String resourceT,
String namespace,
String name) |
protected |
BaseOperation(com.ning.http.client.AsyncHttpClient httpClient,
URL rootUrl,
String resourceT,
String namespace,
String name,
Class<T> type,
Class<L> listType,
Class<D> doneableType) |
protected BaseOperation(com.ning.http.client.AsyncHttpClient httpClient,
URL rootUrl,
String resourceT,
String namespace,
String name)
public T get() throws KubernetesClientException
get in interface Gettable<T>KubernetesClientException - if not existspublic T getIfExists()
getIfExists in interface Gettable<T>public D edit() throws KubernetesClientException
edit in interface Editable<D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic NonNamespaceOperation<T,L,D,R> inNamespace(String namespace)
inNamespace in interface Namespaceable<NonNamespaceOperation<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D extends io.fabric8.kubernetes.api.model.Doneable<T>,R extends Resource<T,D>>>public T create(T resource) throws KubernetesClientException
create in interface Createable<T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic D createNew() throws KubernetesClientException
createNew in interface Createable<T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic FilterWatchListDeleteable<T,L> withLabels(Map<String,String> labels)
withLabels in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>>public FilterWatchListDeleteable<T,L> withoutLabels(Map<String,String> labels) throws KubernetesClientException
withoutLabels in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>>KubernetesClientExceptionpublic FilterWatchListDeleteable<T,L> withLabelIn(String key, String... values) throws KubernetesClientException
withLabelIn in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>>KubernetesClientExceptionpublic FilterWatchListDeleteable<T,L> withLabelNotIn(String key, String... values) throws KubernetesClientException
withLabelNotIn in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>>KubernetesClientExceptionpublic FilterWatchListDeleteable<T,L> withLabel(String key, String value)
withLabel in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>>public FilterWatchListDeleteable<T,L> withoutLabel(String key, String value) throws KubernetesClientException
withoutLabel in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>>KubernetesClientExceptionpublic FilterWatchListDeleteable<T,L> withFields(Map<String,String> labels)
withFields in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>>public FilterWatchListDeleteable<T,L> withField(String key, String value)
withField in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>>public L list() throws KubernetesClientException
list in interface Listable<L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>KubernetesClientExceptionpublic void delete()
throws KubernetesClientException
Deleteabledelete in interface Deleteable<T>KubernetesClientException - if resource is not found.public boolean deleteIfExists()
DeleteabledeleteIfExists in interface Deleteable<T>public com.ning.http.client.ws.WebSocket watch(Watcher<T> watcher) throws KubernetesClientException
watch in interface Watchable<T>KubernetesClientExceptionpublic T update(T item)
update in interface Updateable<T>protected URL getNamespacedUrl() throws MalformedURLException
MalformedURLExceptionprotected URL getResourceUrl() throws MalformedURLException
MalformedURLExceptionprotected T handleResponse(com.ning.http.client.AsyncHttpClient.BoundRequestBuilder requestBuilder, int successStatusCode) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected void handleDelete(URL requestUrl) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleCreate(T resource) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleUpdate(URL resourceUrl, T updated) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleGet(URL resourceUrl) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
public URL getRootUrl()
public com.ning.http.client.AsyncHttpClient getHttpClient()
public String getName()
public String getNamespace()
public String getResourceT()
Copyright © 2015 Red Hat. All rights reserved.