@ThreadSafe public abstract class AbstractRestrictedResourceRetriever extends Object implements RestrictedResourceRetriever
Constructor and Description |
---|
AbstractRestrictedResourceRetriever(int connectTimeout,
int readTimeout,
int sizeLimit)
Creates a new abstract restricted resource retriever.
|
Modifier and Type | Method and Description |
---|---|
int |
getConnectTimeout()
Gets the HTTP connect timeout.
|
Map<String,List<String>> |
getHeaders()
Gets the headers to set for the HTTP request.
|
int |
getReadTimeout()
Gets the HTTP read timeout.
|
int |
getSizeLimit()
Gets the HTTP entity size limit.
|
void |
setConnectTimeout(int connectTimeoutMs)
Sets the HTTP connect timeout.
|
void |
setHeaders(Map<String,List<String>> headers)
Sets the headers to set for the HTTP request.
|
void |
setReadTimeout(int readTimeoutMs)
Sets the HTTP read timeout.
|
void |
setSizeLimit(int sizeLimitBytes)
Sets the HTTP entity size limit.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
retrieveResource
public AbstractRestrictedResourceRetriever(int connectTimeout, int readTimeout, int sizeLimit)
connectTimeout
- The HTTP connects timeout, in milliseconds,
zero for infinite. Must not be negative.readTimeout
- The HTTP read timeout, in milliseconds, zero
for infinite. Must not be negative.sizeLimit
- The HTTP entity size limit, in bytes, zero for
infinite. Must not be negative.public int getConnectTimeout()
RestrictedResourceRetriever
getConnectTimeout
in interface RestrictedResourceRetriever
public void setConnectTimeout(int connectTimeoutMs)
RestrictedResourceRetriever
setConnectTimeout
in interface RestrictedResourceRetriever
connectTimeoutMs
- The HTTP connect timeout, in milliseconds,
zero for infinite. Must not be negative.public int getReadTimeout()
RestrictedResourceRetriever
getReadTimeout
in interface RestrictedResourceRetriever
public void setReadTimeout(int readTimeoutMs)
RestrictedResourceRetriever
setReadTimeout
in interface RestrictedResourceRetriever
readTimeoutMs
- The HTTP read timeout, in milliseconds, zero
for infinite. Must not be negative.public int getSizeLimit()
RestrictedResourceRetriever
getSizeLimit
in interface RestrictedResourceRetriever
public void setSizeLimit(int sizeLimitBytes)
RestrictedResourceRetriever
setSizeLimit
in interface RestrictedResourceRetriever
sizeLimitBytes
- The HTTP entity size limit, in bytes, zero for
infinite. Must not be negative.public Map<String,List<String>> getHeaders()
RestrictedResourceRetriever
getHeaders
in interface RestrictedResourceRetriever
null
if not
set.public void setHeaders(Map<String,List<String>> headers)
RestrictedResourceRetriever
setHeaders
in interface RestrictedResourceRetriever
headers
- The HTTP headers as name - values map, null
if none.Copyright © 2021 Connect2id Ltd.. All rights reserved.