|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codegist.crest.config.Configs
public final class Configs
Method Summary | |
---|---|
static InterfaceConfig |
override(InterfaceConfig base,
InterfaceConfig overrides)
Overrides and config (overrides) with another one (base). |
static MethodConfig |
override(MethodConfig base,
MethodConfig overrides)
Overrides and config (overrides) with another one (base). |
static ParamConfig |
override(ParamConfig base,
ParamConfig overrides)
Overrides and config (overrides) with another one (base). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static InterfaceConfig override(InterfaceConfig base, InterfaceConfig overrides)
The override is a config template where nulls values are legals and will fallback to the base config. Base config must apply to the general contract of InterfaceConfig
.
Any non-null values in override config will take priority over base config.
RequestInterceptor are not overriding each other but are chaining, thus if either override and base configs declare a request interceptor, both of them will run, with the override's request interceptor running before the base one.
The returned config is a dynamic view over the two given config, thus the two configs can change over time and the resulting config will reflect the changes.
base
- Normal full configured config, respect the general contract of InterfaceConfig objectoverrides
- Config template, can hold null values, that plays as flag to indicate a fallback to the base config
InterfaceConfig
public static MethodConfig override(MethodConfig base, MethodConfig overrides)
The override is a config template where nulls values are legals and will fallback to the base config. Base config must apply to the general contract of MethodConfig
.
Any non-null values in override config will take priority over base config.
RequestInterceptor are not overriding each other but are chaining, thus if either override and base configs declare a request interceptor, both of them will run, with the override's request interceptor running before the base one.
The returned config is a dynamic view over the two given config, thus the two configs can change over time and the resulting config will reflect the changes.
base
- Normal full configured config, respect the general contract of MethodConfig objectoverrides
- Config template, can hold null values, that plays as flag to indicate a fallback to the base config
MethodConfig
public static ParamConfig override(ParamConfig base, ParamConfig overrides)
The override is a config template where nulls values are legals and will fallback to the base config. Base config must apply to the general contract of ParamConfig
.
Any non-null values in override config will take priority over base config.
The returned config is a dynamic view over the two given config, thus the two configs can change over time and the resulting config will reflect the changes.
base
- Normal full configured config, respect the general contract of ParamConfig objectoverrides
- Config template, can hold null values, that plays as flag to indicate a fallback to the base config
ParamConfig
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |