BaseStreamRequest<T> Class
- java.
lang. Object - com.
microsoft. graph. http. BaseStreamRequest<T>
- com.
Type Parameters
- T
the class of the response type
Implements
public abstract class BaseStreamRequest<T>
implements IHttpStreamRequest
A request for a binary stream
Constructor Summary
| Constructor | Description |
|---|---|
| BaseStreamRequest(String requestUrl, IBaseClient<?> client, List<? extends Option> options, Class<T> responseClass) |
Creates the stream request. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| nativeRequestType |
<requestBodyType,responseType,nativeRequestType>getHttpRequest(requestBodyType serializedObject)
Returns the Request object to be executed |
| void |
addHeader(String header, String value)
Adds a header to this request |
| long |
getDelay()
Gets delay between retries |
|
java.util.List<Header |
getHeaders()
Gets the headers |
|
Http |
getHttpMethod()
Gets the HTTP method |
| int |
getMaxRedirects()
Gets the max redirects |
| int |
getMaxRetries()
Gets max retries |
| java.util.List<Option> |
getOptions()
Gets the query options for this request |
| java.net.URL |
getRequestUrl()
Gets the request URL |
|
IShould |
getShouldRedirect()
Gets the should redirect callback |
|
IShould |
getShouldRetry()
Gets the should retry callback |
| boolean |
getUseCaches()
Gets use |
| protected java.io.InputStream |
send()
Sends this request |
| protected T |
send(byte[] fileContents)
Sends this request |
| protected java.util.concurrent.CompletableFuture<java.io.InputStream> |
sendAsync()
Sends this request |
| protected java.util.concurrent.CompletableFuture<T> |
sendAsync(byte[] fileContents)
Sends this request |
| void |
setDelay(long delay)
Sets the delay in seconds between retires |
| void |
setMaxRedirects(int maxRedirects)
Sets the max redirects |
| void |
setMaxRetries(int maxRetries)
Sets the max retries |
| void |
setShouldRedirect(IShouldRedirect shouldRedirect)
Sets the should redirect callback |
| void |
setShouldRetry(IShouldRetry shouldretry)
Sets the should retry callback |
| void |
setUseCaches(boolean useCaches)
Sets use |
|
IHttp |
withHttpMethod(HttpMethod httpMethod)
Sets the HTTP method and returns the current request |
Methods inherited from java.lang.Object
Constructor Details
BaseStreamRequest
public BaseStreamRequest(String requestUrl, IBaseClient client, List options, Class
Creates the stream request.
Parameters:
Method Details
<requestBodyType,responseType,nativeRequestType>getHttpRequest
public nativeRequestType
Returns the Request object to be executed
Parameters:
Returns:
Throws:
addHeader
public void addHeader(String header, String value)
Adds a header to this request
Parameters:
getDelay
public long getDelay()
Gets delay between retries
Returns:
getHeaders
public List
Gets the headers
Returns:
getHttpMethod
public HttpMethod getHttpMethod()
Gets the HTTP method
Returns:
getMaxRedirects
public int getMaxRedirects()
Gets the max redirects
Returns:
getMaxRetries
public int getMaxRetries()
Gets max retries
Returns:
getOptions
public List
Gets the query options for this request
Returns:
getRequestUrl
public URL getRequestUrl()
Gets the request URL
Returns:
getShouldRedirect
public IShouldRedirect getShouldRedirect()
Gets the should redirect callback
Returns:
getShouldRetry
public IShouldRetry getShouldRetry()
Gets the should retry callback
Returns:
getUseCaches
public boolean getUseCaches()
Gets useCaches parameter
Returns:
send
protected InputStream send()
Sends this request
Returns:
Throws:
send
protected T send(byte[] fileContents)
Sends this request
Parameters:
Returns:
sendAsync
protected CompletableFuture
Sends this request
Returns:
sendAsync
protected CompletableFuture
Sends this request
Parameters:
Returns:
setDelay
public void setDelay(long delay)
Sets the delay in seconds between retires
Parameters:
setMaxRedirects
public void setMaxRedirects(int maxRedirects)
Sets the max redirects
Parameters:
setMaxRetries
public void setMaxRetries(int maxRetries)
Sets the max retries
Parameters:
setShouldRedirect
public void setShouldRedirect(IShouldRedirect shouldRedirect)
Sets the should redirect callback
Parameters:
setShouldRetry
public void setShouldRetry(IShouldRetry shouldretry)
Sets the should retry callback
Parameters:
setUseCaches
public void setUseCaches(boolean useCaches)
Sets useCaches parameter to cache the response
Parameters:
withHttpMethod
public IHttpRequest withHttpMethod(HttpMethod httpMethod)
Sets the HTTP method and returns the current request
Parameters:
Returns: