@ApiAudience.Public @ApiStability.Unstable public interface Context
Modifier and Type | Method and Description |
---|---|
ChainIdHash |
getChainIdHash()
Get chain id hash of a context.
|
Configuration |
getConfiguration()
Get a configuration of a context.
|
java.lang.String |
getScope()
Get scope of a context.
|
java.util.Set<Strategy> |
getStrategies()
Get a strategies of a context.
|
<StrategyT extends Strategy> |
getStrategy(java.lang.Class<StrategyT> strategyClass)
Get a strategy whose matches type
strategyClass from a context. |
Context |
popScope()
Get a context instance without current scope.
|
Context |
withChainIdHash(ChainIdHash chainIdHash)
Make a context instance with
chainIdHash . |
Context |
withConfiguration(Configuration configuration)
Make a context instance with corresponding
configuration . |
Context |
withKeyValue(java.lang.String key,
java.lang.Object value)
Make a context instance with corresponding
key and a value . |
Context |
withoutKey(java.lang.String key)
Get a context instance without configuration matching
key . |
<StrategyT extends Strategy> |
withoutStrategy(java.lang.Class<StrategyT> strategy)
Remove strategy from the context.
|
Context |
withScope(java.lang.String scope)
Make a context instance with
scope . |
Context |
withStrategies(java.util.Set<Strategy> strategies)
Make a context instance with corresponding
strategies . |
<StrategyT extends Strategy> |
withStrategy(StrategyT strategy)
Make a context instance with corresponding
strategy . |
Context withScope(java.lang.String scope)
scope
.scope
- a scopescope
java.lang.String getScope()
Context popScope()
Context withChainIdHash(ChainIdHash chainIdHash)
chainIdHash
.chainIdHash
- a chain id hashchainIdHash
ChainIdHash getChainIdHash()
Context withKeyValue(java.lang.String key, java.lang.Object value)
key
and a value
.key
- a keyvalue
- a valueContext withConfiguration(Configuration configuration)
configuration
.configuration
- a configurationconfiguration
Configuration getConfiguration()
Context withoutKey(java.lang.String key)
key
.key
- a key<StrategyT extends Strategy> Context withStrategy(StrategyT strategy)
strategy
.StrategyT
- strategy typestrategy
- a strategyStrategy
Context withStrategies(java.util.Set<Strategy> strategies)
strategies
.strategies
- new strategiesstrategies
<StrategyT extends Strategy> StrategyT getStrategy(java.lang.Class<StrategyT> strategyClass)
strategyClass
from a context.StrategyT
- strategy typestrategyClass
- a strategy classstrategyClass
. Otherwise, nulljava.util.Set<Strategy> getStrategies()