Class DefaultEntityStatementRetriever
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.federation.trust.DefaultEntityStatementRetriever
-
- All Implemented Interfaces:
EntityStatementRetriever
public class DefaultEntityStatementRetriever extends Object implements EntityStatementRetriever
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_HTTP_CONNECT_TIMEOUT_MSThe default HTTP connect timeout in milliseconds.static intDEFAULT_HTTP_READ_TIMEOUT_MSThe default HTTP read timeout in milliseconds.
-
Constructor Summary
Constructors Constructor Description DefaultEntityStatementRetriever()Creates a new entity statement retriever using the default HTTP timeout settings.DefaultEntityStatementRetriever(int httpConnectTimeoutMs, int httpReadTimeoutMs)Creates a new entity statement retriever.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityStatementfetchEntityConfiguration(EntityID target)Fetches an entity configuration.EntityStatementfetchEntityStatement(URI federationAPIEndpoint, EntityID issuer, EntityID subject)Fetches an entity statement.intgetHTTPConnectTimeout()Returns the configured HTTP connect timeout.intgetHTTPReadTimeout()Returns the configured HTTP read timeout.List<URI>getRecordedRequests()Returns the running list of the recorded HTTP requests.
-
-
-
Field Detail
-
DEFAULT_HTTP_CONNECT_TIMEOUT_MS
public static final int DEFAULT_HTTP_CONNECT_TIMEOUT_MS
The default HTTP connect timeout in milliseconds.- See Also:
- Constant Field Values
-
DEFAULT_HTTP_READ_TIMEOUT_MS
public static final int DEFAULT_HTTP_READ_TIMEOUT_MS
The default HTTP read timeout in milliseconds.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultEntityStatementRetriever
public DefaultEntityStatementRetriever()
Creates a new entity statement retriever using the default HTTP timeout settings.
-
DefaultEntityStatementRetriever
public DefaultEntityStatementRetriever(int httpConnectTimeoutMs, int httpReadTimeoutMs)
Creates a new entity statement retriever.- Parameters:
httpConnectTimeoutMs- The HTTP connect timeout in milliseconds, zero means timeout determined by the underlying HTTP client.httpReadTimeoutMs- The HTTP read timeout in milliseconds, zero means timeout determined by the underlying HTTP client.
-
-
Method Detail
-
getHTTPConnectTimeout
public int getHTTPConnectTimeout()
Returns the configured HTTP connect timeout.- Returns:
- The configured HTTP connect timeout in milliseconds, zero means timeout determined by the underlying HTTP client.
-
getHTTPReadTimeout
public int getHTTPReadTimeout()
Returns the configured HTTP read timeout.- Returns:
- The configured HTTP read timeout in milliseconds, zero means timeout determined by the underlying HTTP client.
-
fetchEntityConfiguration
public EntityStatement fetchEntityConfiguration(EntityID target) throws ResolveException
Description copied from interface:EntityStatementRetrieverFetches an entity configuration.- Specified by:
fetchEntityConfigurationin interfaceEntityStatementRetriever- Parameters:
target- The entity ID. Must not benull.- Returns:
- The entity statement.
- Throws:
ResolveException- If fetching failed.
-
fetchEntityStatement
public EntityStatement fetchEntityStatement(URI federationAPIEndpoint, EntityID issuer, EntityID subject) throws ResolveException
Description copied from interface:EntityStatementRetrieverFetches an entity statement.- Specified by:
fetchEntityStatementin interfaceEntityStatementRetriever- Parameters:
federationAPIEndpoint- The federation API endpoint. Must not benull.issuer- The entity statement issuer, typically the ID of the entity operating the endpoint. Must not benull.subject- The entity statement subject. Must not benull.- Returns:
- The entity statement.
- Throws:
ResolveException- If fetching failed.
-
getRecordedRequests
public List<URI> getRecordedRequests()
Returns the running list of the recorded HTTP requests.- Returns:
- The HTTP request URIs (with query parameters), empty if none.
-
-