public class BaseOperation<C extends Client,T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D extends io.fabric8.kubernetes.api.model.Doneable<T>,R extends ClientResource<T,D>> extends Object implements ClientMixedOperation<C,T,L,D,R>
| Modifier and Type | Field and Description |
|---|---|
protected static com.fasterxml.jackson.databind.ObjectMapper |
mapper |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseOperation(C client,
String resourceT,
String namespace,
String name,
Boolean cascading,
T item) |
protected |
BaseOperation(C client,
String resourceT,
String namespace,
String name,
Boolean cascading,
T item,
Class<T> type,
Class<L> listType,
Class<D> doneableType) |
protected BaseOperation(C client, String resourceT, String namespace, String name, Boolean cascading, T item)
public T get()
public io.fabric8.kubernetes.api.model.RootPaths getRootPaths()
public D edit() throws KubernetesClientException
edit in interface Editable<D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic ClientNonNamespaceOperation<C,T,L,D,R> inNamespace(String namespace)
inNamespace in interface Namespaceable<ClientNonNamespaceOperation<C extends Client,T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D extends io.fabric8.kubernetes.api.model.Doneable<T>,R extends ClientResource<T,D>>>public ClientNonNamespaceOperation<C,T,L,D,R> inAnyNamespace()
inAnyNamespace in interface AnyNamespaceable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>public EditReplaceDeletable<T,T,D,Boolean> cascading(boolean enabled)
public R load(InputStream is)
load in interface Loadable<InputStream,R extends ClientResource<T,D>>public T create(T... resources) throws KubernetesClientException
create in interface Createable<T,T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic D createNew() throws KubernetesClientException
createNew in interface Createable<T,T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>KubernetesClientExceptionpublic FilterWatchListDeletable<T,L,Boolean> withLabels(Map<String,String> labels)
withLabels in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>public FilterWatchListDeletable<T,L,Boolean> withoutLabels(Map<String,String> labels) throws KubernetesClientException
withoutLabels in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>KubernetesClientExceptionpublic FilterWatchListDeletable<T,L,Boolean> withLabelIn(String key, String... values) throws KubernetesClientException
withLabelIn in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>KubernetesClientExceptionpublic FilterWatchListDeletable<T,L,Boolean> withLabelNotIn(String key, String... values) throws KubernetesClientException
withLabelNotIn in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>KubernetesClientExceptionpublic FilterWatchListDeletable<T,L,Boolean> withLabel(String key, String value)
withLabel in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>public FilterWatchListDeletable<T,L,Boolean> withoutLabel(String key, String value) throws KubernetesClientException
withoutLabel in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>KubernetesClientExceptionpublic FilterWatchListDeletable<T,L,Boolean> withFields(Map<String,String> labels)
withFields in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>public FilterWatchListDeletable<T,L,Boolean> withField(String key, String value)
withField in interface Filterable<FilterWatchListDeletable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList,Boolean>>public L list() throws KubernetesClientException
list in interface Listable<L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>KubernetesClientExceptionpublic Boolean delete()
Deletablepublic Watch watch(Watcher<T> watcher) throws KubernetesClientException
watch in interface Watchable<T>KubernetesClientExceptionpublic Watch watch(String resourceVersion, Watcher<T> watcher) throws KubernetesClientException
watch in interface Watchable<T>KubernetesClientExceptionprotected URL getNamespacedUrl() throws MalformedURLException
MalformedURLExceptionprotected URL getResourceUrl() throws MalformedURLException
MalformedURLExceptionprotected void assertResponseCode(com.ning.http.client.Response r,
int expectedStatusCode)
r - The Response object.expectedStatusCode - The expected status code.KubernetesClientException - When the response code is not the expected.protected 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 handleReplace(URL resourceUrl, T updated) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected T handleGet(URL resourceUrl) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
public URL getRootUrl()
public String getName()
public String getNamespace()
public Boolean isCascading()
public T getItem()
public String getResourceT()
public C getClient()
getClient in interface ClientAware<C extends Client>protected boolean isReaping()
protected void setReaping(boolean reaping)
Copyright © 2015 Red Hat. All rights reserved.