public class AbfsHttpOperation extends Object
| Constructor and Description |
|---|
AbfsHttpOperation(URL url,
String method,
List<AbfsHttpHeader> requestHeaders)
Initializes a new HTTP request and opens the connection.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getBytesReceived() |
int |
getBytesSent() |
String |
getClientRequestId() |
protected HttpURLConnection |
getConnection() |
ListResultSchema |
getListResultSchema() |
String |
getMethod() |
String |
getRequestId() |
String |
getResponseHeader(String httpHeader) |
int |
getStatusCode() |
String |
getStatusDescription() |
String |
getStorageErrorCode() |
String |
getStorageErrorMessage() |
URL |
getUrl() |
void |
processResponse(byte[] buffer,
int offset,
int length)
Gets and processes the HTTP response.
|
void |
sendRequest(byte[] buffer,
int offset,
int length)
Sends the HTTP request.
|
String |
toString() |
public AbfsHttpOperation(URL url, String method, List<AbfsHttpHeader> requestHeaders) throws IOException
url - The full URL including query string parameters.method - The HTTP method (PUT, PATCH, POST, GET, HEAD, or DELETE).requestHeaders - The HTTP request headers.READ_TIMEOUTIOException - if an error occurs.protected HttpURLConnection getConnection()
public String getMethod()
public URL getUrl()
public int getStatusCode()
public String getStatusDescription()
public String getStorageErrorCode()
public String getStorageErrorMessage()
public String getClientRequestId()
public String getRequestId()
public int getBytesSent()
public long getBytesReceived()
public ListResultSchema getListResultSchema()
public void sendRequest(byte[] buffer,
int offset,
int length)
throws IOException
buffer - the request entity body.offset - an offset into the buffer where the data beings.length - the length of the data in the buffer.IOException - if an error occurs.public void processResponse(byte[] buffer,
int offset,
int length)
throws IOException
buffer - a buffer to hold the response entity bodyoffset - an offset in the buffer where the data will being.length - the number of bytes to be written to the buffer.IOException - if an error occurs.Copyright © 2008–2020 Apache Software Foundation. All rights reserved.