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
- IOException
public void computeEncHash() throws IOException
IOException
public boolean connect() throws IOException
connect
in class BaseHttpConnection
IOException
- upon connection failurepublic void validate() throws IOException
BaseHttpConnection
validate
in class BaseHttpConnection
IOException
public DataInputStream getInputStream() throws IOException
getInputStream
in class BaseHttpConnection
IOException
public void cleanup(boolean disconnect) throws IOException
cleanup
in class BaseHttpConnection
disconnect
- Close the connection if this is true; otherwise respect keepaliveIOException
Copyright © 2016 Apache Software Foundation. All rights reserved.