public class AbfsHttpOperation extends Object implements AbfsPerfLoggable
| Modifier and Type | Class and Description |
|---|---|
static class |
AbfsHttpOperation.AbfsHttpOperationWithFixedResult |
| Modifier | Constructor and Description |
|---|---|
protected |
AbfsHttpOperation(URL url,
String method,
int httpStatus)
Constructor for FixedResult instance, avoiding connection init.
|
|
AbfsHttpOperation(URL url,
String method,
List<AbfsHttpHeader> requestHeaders)
Initializes a new HTTP request and opens the connection.
|
| Modifier and Type | Method and Description |
|---|---|
static AbfsHttpOperation |
getAbfsHttpOperationWithFixedResult(URL url,
String method,
int httpStatus) |
long |
getBytesReceived() |
int |
getBytesSent() |
String |
getClientRequestId() |
protected HttpURLConnection |
getConnection() |
String |
getExpectedAppendPos() |
String |
getHost() |
ListResultSchema |
getListResultSchema() |
String |
getLogString()
Gets the string to log to the Abfs Logging API.
|
String |
getMaskedEncodedUrl() |
String |
getMaskedUrl() |
String |
getMethod() |
String |
getRequestId() |
String |
getResponseHeader(String httpHeader) |
int |
getStatusCode() |
String |
getStatusDescription() |
String |
getStorageErrorCode() |
String |
getStorageErrorMessage() |
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.
|
void |
setMaskForSAS() |
void |
setRequestProperty(String key,
String value) |
String |
toString() |
protected AbfsHttpOperation(URL url, String method, int httpStatus)
url - request urlmethod - Http methodhttpStatus - HttpStatuspublic 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.public static AbfsHttpOperation getAbfsHttpOperationWithFixedResult(URL url, String method, int httpStatus)
protected HttpURLConnection getConnection()
public String getMethod()
public String getHost()
public int getStatusCode()
public String getStatusDescription()
public String getStorageErrorCode()
public String getStorageErrorMessage()
public String getClientRequestId()
public String getExpectedAppendPos()
public String getRequestId()
public void setMaskForSAS()
public int getBytesSent()
public long getBytesReceived()
public ListResultSchema getListResultSchema()
public String getLogString()
AbfsPerfLoggablegetLogString in interface AbfsPerfLoggablepublic String getMaskedUrl()
public String getMaskedEncodedUrl()
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–2022 Apache Software Foundation. All rights reserved.