public class HttpConnection extends BaseHttpConnection
| Modifier and Type | Field and Description |
|---|---|
protected HttpURLConnection |
connection |
UNIT_CONNECT_TIMEOUT| Constructor and Description |
|---|
HttpConnection(URL url,
HttpConnectionParams connParams,
String logIdentifier,
org.apache.tez.common.security.JobTokenSecretManager jobTokenSecretManager)
HttpConnection
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(boolean disconnect)
Cleanup the connection.
|
void |
computeEncHash() |
boolean |
connect()
Connect to source
|
DataInputStream |
getInputStream()
Get the inputstream from the connection
|
void |
validate()
Validate established connection
|
protected volatile HttpURLConnection connection
public HttpConnection(URL url, HttpConnectionParams connParams, String logIdentifier, org.apache.tez.common.security.JobTokenSecretManager jobTokenSecretManager) throws IOException
url - connParams - logIdentifier - jobTokenSecretManager - IOExceptionpublic void computeEncHash()
throws IOException
IOExceptionpublic boolean connect()
throws IOException
connect in class BaseHttpConnectionIOException - upon connection failurepublic void validate()
throws IOException
BaseHttpConnectionvalidate in class BaseHttpConnectionIOExceptionpublic DataInputStream getInputStream() throws IOException
getInputStream in class BaseHttpConnectionIOExceptionpublic void cleanup(boolean disconnect)
throws IOException
cleanup in class BaseHttpConnectiondisconnect - Close the connection if this is true; otherwise respect keepaliveIOExceptionCopyright © 2016 Apache Software Foundation. All rights reserved.