本文整理匯總了Java中org.opensaml.saml2.metadata.provider.ObservableMetadataProvider類的典型用法代碼示例。如果您正苦於以下問題:Java ObservableMetadataProvider類的具體用法?Java ObservableMetadataProvider怎麽用?Java ObservableMetadataProvider使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ObservableMetadataProvider類屬於org.opensaml.saml2.metadata.provider包,在下文中一共展示了ObservableMetadataProvider類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: MetadataCredentialResolver
import org.opensaml.saml2.metadata.provider.ObservableMetadataProvider; //導入依賴的package包/類
/**
* Constructor.
*
* @param metadataProvider provider of the metadata
*
* @throws IllegalArgumentException thrown if the supplied provider is null
*/
public MetadataCredentialResolver(MetadataProvider metadataProvider) {
super();
if (metadataProvider == null) {
throw new IllegalArgumentException("Metadata provider may not be null");
}
metadata = metadataProvider;
cache = new HashMap<MetadataCacheKey, SoftReference<Collection<Credential>>>();
keyInfoCredentialResolver = Configuration.getGlobalSecurityConfiguration()
.getDefaultKeyInfoCredentialResolver();
rwlock = new ReentrantReadWriteLock();
if (metadata instanceof ObservableMetadataProvider) {
ObservableMetadataProvider observable = (ObservableMetadataProvider) metadataProvider;
observable.getObservers().add(new MetadataProviderObserver());
}
}