public abstract class AbstractRequest<T> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRequest(KnoxSession session) |
protected |
AbstractRequest(KnoxSession session,
String doAsUser) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addParam(List<org.apache.http.NameValuePair> list,
String name,
String value) |
protected void |
addQueryParam(org.apache.http.client.utils.URIBuilder uri,
String name,
Object value) |
protected abstract Callable<T> |
callable() |
protected org.apache.http.client.methods.CloseableHttpResponse |
execute(org.apache.http.HttpRequest request) |
String |
getDoAsUser() |
KnoxSession |
getSession() |
protected KnoxSession |
hadoop() |
Future<T> |
later() |
Future<T> |
later(groovy.lang.Closure<Void> closure) |
T |
now() |
protected org.apache.http.client.utils.URIBuilder |
uri(String... parts) |
protected AbstractRequest(KnoxSession session)
protected AbstractRequest(KnoxSession session, String doAsUser)
protected KnoxSession hadoop()
protected org.apache.http.client.methods.CloseableHttpResponse execute(org.apache.http.HttpRequest request)
throws IOException
IOExceptionprotected org.apache.http.client.utils.URIBuilder uri(String... parts) throws URISyntaxException
URISyntaxExceptionprotected void addQueryParam(org.apache.http.client.utils.URIBuilder uri,
String name,
Object value)
protected void addParam(List<org.apache.http.NameValuePair> list, String name, String value)
public KnoxSession getSession()
public T now() throws KnoxShellException
KnoxShellExceptionpublic String getDoAsUser()
Copyright © 2020 The Apache Software Foundation. All rights reserved.