public class OperationSupport<C extends Client> extends Object
Modifier and Type | Field and Description |
---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
OBJECT_MAPPER |
Constructor and Description |
---|
OperationSupport(C client,
String resourceT,
String namespace,
String name) |
Modifier and Type | Method and Description |
---|---|
protected <T> String |
checkName(T item) |
protected <T> String |
checkNamespace(T item) |
C |
getClient() |
String |
getName() |
String |
getNamespace() |
protected URL |
getNamespacedUrl() |
protected URL |
getNamespacedUrl(String namespace) |
String |
getResourceT() |
protected URL |
getResourceUrl() |
protected URL |
getResourceUrl(String namespace,
String name) |
URL |
getRootUrl() |
protected <T,I> T |
handleCreate(I resource,
Class<T> outputType) |
protected <T> void |
handleDelete(T resource) |
protected void |
handleDelete(URL requestUrl) |
protected <T> T |
handleGet(URL resourceUrl,
Class<T> type) |
protected <T> T |
handleReplace(T updated,
Class<T> type) |
protected <T> T |
handleResponse(com.ning.http.client.AsyncHttpClient.BoundRequestBuilder requestBuilder,
int successStatusCode,
Class<T> type) |
boolean |
isNamespaceRequired() |
public static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
public C getClient()
public String getResourceT()
public String getNamespace()
public String getName()
public boolean isNamespaceRequired()
public URL getRootUrl()
protected URL getNamespacedUrl(String namespace) throws MalformedURLException
MalformedURLException
protected URL getNamespacedUrl() throws MalformedURLException
MalformedURLException
protected URL getResourceUrl(String namespace, String name) throws MalformedURLException
MalformedURLException
protected URL getResourceUrl() throws MalformedURLException
MalformedURLException
protected <T> String checkNamespace(T item)
protected <T> String checkName(T item)
protected <T> void handleDelete(T resource) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected void handleDelete(URL requestUrl) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected <T,I> T handleCreate(I resource, Class<T> outputType) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected <T> T handleReplace(T updated, Class<T> type) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected <T> T handleGet(URL resourceUrl, Class<T> type) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
protected <T> T handleResponse(com.ning.http.client.AsyncHttpClient.BoundRequestBuilder requestBuilder, int successStatusCode, Class<T> type) throws ExecutionException, InterruptedException, KubernetesClientException, IOException
Copyright © 2015 Red Hat. All rights reserved.