|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nimbusds.openid.connect.sdk.util.DefaultResourceRetriever
@ThreadSafe public class DefaultResourceRetriever
The default retriever of resources specified by URL. Provides setting of HTTP connect and read timeouts. Caching header directives are not honoured. This class is thread-safe.
Constructor Summary | |
---|---|
DefaultResourceRetriever()
Creates a new resource retriever. |
|
DefaultResourceRetriever(int connectTimeout,
int readTimeout)
Creates a new resource retriever. |
Method Summary | |
---|---|
int |
getConnectTimeout()
Gets the HTTP connect timeout. |
int |
getReadTimeout()
Gets the HTTP read timeout. |
Resource |
retrieveResource(URL url)
Retrieves the resource from the specified HTTP(S) URL. |
void |
setConnectTimeout(int connectTimeout)
Sets the HTTP connect timeout. |
void |
setReadTimeout(int readTimeout)
Sets the HTTP read timeout. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultResourceRetriever()
public DefaultResourceRetriever(int connectTimeout, int readTimeout)
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.Method Detail |
---|
public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
connectTimeout
- The HTTP connect timeout, in milliseconds,
zero for infinite. Must not be negative.public int getReadTimeout()
public void setReadTimeout(int readTimeout)
readTimeout
- The HTTP read timeout, in milliseconds, zero for
infinite. Must not be negative.public Resource retrieveResource(URL url) throws IOException
ResourceRetriever
retrieveResource
in interface ResourceRetriever
url
- The URL of the resource. Its scheme must be HTTP or
HTTPS. Must not be null
.
IOException
- If the HTTP connection to the specified URL
failed or the resource couldn't be retrieved.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |