@ThreadSafe public abstract class AbstractDataConnector extends AbstractResolverPlugin<Map<String,IdPAttribute>> implements DataConnectorEx
| Modifier and Type | Field and Description |
|---|---|
private String |
failoverDataConnectorId
ID of the data connector to use if this one fails.
|
private long |
lastFail
When did this connector last fail?
|
private org.slf4j.Logger |
log
Class logger.
|
private String |
logPrefix
cache for the log prefix - to save multiple recalculations.
|
private long |
noRetryDelay
How long to wait until we declare the connector live again.
|
| Constructor and Description |
|---|
AbstractDataConnector() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Map<String,IdPAttribute> |
doDataConnectorResolve(AttributeResolutionContext resolutionContext,
AttributeResolverWorkContext workContext)
Retrieves a collection of attributes from some data source.
|
protected void |
doInitialize() |
Map<String,IdPAttribute> |
doResolve(AttributeResolutionContext resolutionContext,
AttributeResolverWorkContext workContext)
Perform the actual resolution.
|
String |
getFailoverDataConnectorId()
Gets the ID of the
AbstractDataConnector whose values will be used in the event that this data connector
experiences an error. |
long |
getLastFail()
Get the time when this connector last failed.
|
protected String |
getLogPrefix()
Return a string which is to be prepended to all log messages.
|
long |
getNoRetryDelay()
Get how long to wait until we declare the connector (potentially) alive again.
|
void |
setFailoverDataConnectorId(String id)
Set the ID of the
AbstractDataConnector whose values will be used in the event that this data connector
experiences an error. |
void |
setLastFail(long time)
Set the time when this connector last failed.
|
void |
setNoRetryDelay(long delay)
Set how long to wait until we declare the connector (potentially) alive again.
|
doDestroy, equals, getActivationCondition, getDependencies, getProfileContextStrategy, hashCode, isPropagateResolutionExceptions, resolve, setActivationCondition, setDependencies, setProfileContextStrategy, setPropagateResolutionExceptionssetIdgetIddestroy, initialize, isDestroyed, isInitializedclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetActivationCondition, getDependencies, isPropagateResolutionExceptions, resolveinitialize, isInitializeddestroy, isDestroyedgetId@Nonnull private final org.slf4j.Logger log
@Nullable private String failoverDataConnectorId
@Nullable private String logPrefix
private long lastFail
@Duration private long noRetryDelay
@Nullable public String getFailoverDataConnectorId()
AbstractDataConnector whose values will be used in the event that this data connector
experiences an error.getFailoverDataConnectorId in interface DataConnectorAbstractDataConnector whose values will be used in the event that this data connector
experiences an errorpublic void setFailoverDataConnectorId(@Nullable String id)
AbstractDataConnector whose values will be used in the event that this data connector
experiences an error.id - ID of the AbstractDataConnector whose values will be used in the event that this data connector
experiences an errorpublic void setLastFail(long time)
time - what to setpublic long getLastFail()
ResolverPlugin.isPropagateResolutionExceptions()getLastFail in interface DataConnectorEx@Duration public void setNoRetryDelay(@Duration long delay)
delay - what to set@Duration public long getNoRetryDelay()
getNoRetryDelay in interface DataConnectorEx@Nullable public final Map<String,IdPAttribute> doResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException
doDataConnectorResolve(AttributeResolutionContext, AttributeResolverWorkContext). It serves as a future
extension point for introducing new common behavior.doResolve in class AbstractResolverPlugin<Map<String,IdPAttribute>>resolutionContext - current resolution contextworkContext - child context where intermediate results are trackedResolutionException - thrown if there is a problem resolving the attributesAbstractResolverPlugin.resolve(AttributeResolutionContext)protected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractResolverPlugin<Map<String,IdPAttribute>>ComponentInitializationException@Nullable protected abstract Map<String,IdPAttribute> doDataConnectorResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException
resolutionContext - current resolution contextworkContext - current resolver work contextResolutionException - thrown if there is a problem resolving the attributesCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.