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
public D edit() throws KubernetesClientException
edit
in interface Editable<D extends io.fabric8.kubernetes.api.model.Doneable<T>>
KubernetesClientException
public 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>>
KubernetesClientException
public D createNew() throws KubernetesClientException
createNew
in interface Createable<T,D extends io.fabric8.kubernetes.api.model.Doneable<T>>
KubernetesClientException
public 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>>
KubernetesClientException
public FilterWatchListDeleteable<T,L> withLabelIn(String key, String... values) throws KubernetesClientException
withLabelIn
in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>>
KubernetesClientException
public FilterWatchListDeleteable<T,L> withLabelNotIn(String key, String... values) throws KubernetesClientException
withLabelNotIn
in interface Filterable<FilterWatchListDeleteable<T,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList>>
KubernetesClientException
public 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>>
KubernetesClientException
public 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>
KubernetesClientException
public void delete() throws KubernetesClientException
delete
in interface Deleteable<T>
KubernetesClientException
public void deleteThis() throws KubernetesClientException
KubernetesClientException
public void deleteList() throws KubernetesClientException
KubernetesClientException
public com.ning.http.client.ws.WebSocket watch(Watcher<T> watcher) throws KubernetesClientException
watch
in interface Watchable<T>
KubernetesClientException
public T update(T item)
update
in interface Updateable<T>
protected URL getNamespacedUrl() throws MalformedURLException
MalformedURLException
protected URL getResourceUrl() throws MalformedURLException
MalformedURLException
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 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.