Package org.opensaml.saml.metadata.resolver

# Interface RefreshableMetadataResolver

All Superinterfaces:
  `Component`, `IdentifiedComponent`, `MetadataResolver`, `Resolver<EntityDescriptor,CriteriaSet>`

All Known Implementing Classes:
  `AbstractReloadingMetadataResolver`, `ChainingMetadataResolver`, `CompositeMetadataResolver`, `FileBackedHTTPMetadataResolver`, `FilesystemMetadataResolver`, `HTTPMetadataResolver`, `ResourceBackedMetadataResolver`

public interface RefreshableMetadataResolver extends MetadataResolver
Specialization of `MetadataResolver` that supports on-demand refresh.

## Method Summary

Modifier and Type
Method
Description
`Throwable`
`getLastFailureCause()`
Gets the reason the last refresh failed.
`Instant`
`getLastRefresh()`
Gets the time the last refresh cycle occurred.
`Instant`
`getLastSuccessfulRefresh()`
Gets the time the last successful refresh cycle occurred.
`Instant`
`getLastUpdate()`
Get the time that the currently available metadata was last updated.
`void`
`refresh()`
Refresh the data exposed by the resolver.
`Boolean`
`wasLastRefreshSuccess()`
Gets whether the last refresh cycle was successful.

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

### Methods inherited from interface org.opensaml.saml.metadata.resolver.MetadataResolver

`getMetadataFilter, getType, isRequireValidMetadata, setMetadataFilter, setRequireValidMetadata`

### Methods inherited from interface net.shibboleth.shared.resolver.Resolver

`resolve, resolveSingle`

## Method Details

### refresh

void refresh() throws ResolverException
Refresh the data exposed by the resolver.

An implementation of this method should typically be either `synchronized` or make use other locking mechanisms to protect against concurrent access.

Throws:
  `ResolverException` - if the refresh operation was unsuccessful

### getLastRefresh

@Nullable Instant getLastRefresh()
Gets the time the last refresh cycle occurred.

Returns:
  time the last refresh cycle occurred

### getLastUpdate

@Nullable Instant getLastUpdate()
Get the time that the currently available metadata was last updated. Note, this may be different than the time retrieved by `getLastRefresh()` is the metadata was known not to have changed during the last refresh cycle.

Returns:
  time when the currently metadata was last updated, null if metadata has never successfully been read in

### getLastSuccessfulRefresh

@Nullable Instant getLastSuccessfulRefresh()
Gets the time the last successful refresh cycle occurred.

Returns:
  time the last successful refresh cycle occurred

### wasLastRefreshSuccess

@Nullable Boolean wasLastRefreshSuccess()
Gets whether the last refresh cycle was successful.

Returns:
  true if last refresh cycle was successful, false if not

### getLastFailureCause

@Nullable Throwable getLastFailureCause()
Gets the reason the last refresh failed.

Returns:
  reason the last refresh failed or null if the last refresh was successful