Class PropagateTokenAdvisor.Default
java.lang.Object
com.svenruppert.jsentinel.credential.propagation.PropagateTokenAdvisor.Default
- All Implemented Interfaces:
PropagateTokenAdvisor
- Enclosing interface:
PropagateTokenAdvisor
public static final class PropagateTokenAdvisor.Default
extends Object
implements PropagateTokenAdvisor
Stateless default advisor: looks up the strategy by
PropagateToken.strategy() via
JSentinelServiceResolver.findOutboundTokenStrategy(String),
calls its resolve with the store's current credential, and
— when PropagateToken.header() is non-empty — overrides the
strategy's chosen header name.
An unregistered strategy returns Optional.empty(); the
advisor never raises. STRICT-mode diagnostics surface the
propagation/unknown-strategy code separately (V00.74 Prompt
018) so this call stays side-effect-free.
- Since:
- 00.74.00
-
Nested Class Summary
Nested classes/interfaces inherited from interface PropagateTokenAdvisor
PropagateTokenAdvisor.DefaultModifier and TypeInterfaceDescriptionstatic final classStateless default advisor: looks up the strategy byPropagateToken.strategy()viaJSentinelServiceResolver.findOutboundTokenStrategy(String), calls itsresolvewith the store's current credential, and — whenPropagateToken.header()is non-empty — overrides the strategy's chosen header name. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropagateTokenAdvisor.DefaultShared singleton; advisor is stateless. -
Method Summary
Modifier and TypeMethodDescriptionadviseFor(PropagateToken annotation, OutboundCall call, TokenCredentialStore store)
-
Field Details
-
INSTANCE
Shared singleton; advisor is stateless.
-
-
Method Details
-
adviseFor
public Optional<HeaderValue> adviseFor(PropagateToken annotation, OutboundCall call, TokenCredentialStore store) - Specified by:
adviseForin interfacePropagateTokenAdvisor- Parameters:
annotation- the resolved annotationcall- the outbound call about to firestore- the active credential store- Returns:
- the header to bind, or empty to skip
-