public interface MatsProfiles
ScenarioConnectionFactoryProducer
and the default configuration of
ConfigurableScenarioDecider
. The latter both checks the Spring Profiles for active profiles with the names
(or, for PROFILE_MATS_TEST
, name prefix) specified here, but also checks the Spring
Environment
for the existence of a property of the same names but with the dash ("-") replaced by dot (".").
The Spring Environment by default consist of System Properties and Environment Variables.
The main documentation for the MatsScenario concept is in the JavaDoc of
ScenarioConnectionFactoryProducer
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROFILE_MATS_LOCALHOST
If this Spring Profile ("mats-localhost") is active, the ConnectionFactory specified by
ScenarioConnectionFactoryProducer#withLocalhostConnectionFactory(ConnectionFactoryProvider) will be used. |
static java.lang.String |
PROFILE_MATS_LOCALVM
If this Spring Profile ("mats-localvm") is active, the ConnectionFactory specified by
ScenarioConnectionFactoryProducer#withLocalVmConnectionFactory(ConnectionFactoryProvider) will be used. |
static java.lang.String |
PROFILE_MATS_MOCKS
Suggested Profile name ("mats-mocks") (or Profile name prefix if you want to divide the mocks into sets) to use
when you mock out project-external collaborator Mats Endpoints for use in the "LocalVM" scenario.
|
static java.lang.String |
PROFILE_MATS_REGULAR
If this Spring Profile ("mats-regular") is active, the
ConnectionFactory specified by
ScenarioConnectionFactoryProducer#withRegularConnectionFactory(ConnectionFactoryProvider) will be used. |
static java.lang.String |
PROFILE_MATS_TEST
Profile name ("mats-test") that is a synonym to
PROFILE_MATS_LOCALVM wrt. |
static java.lang.String |
PROFILE_PRODUCTION
Common Profile name ("production") that is a synonym to
PROFILE_MATS_REGULAR wrt. |
static java.lang.String |
PROFILE_STAGING
Common Profile name ("staging") that is a synonym to
PROFILE_MATS_REGULAR wrt. |
static final java.lang.String PROFILE_MATS_REGULAR
ConnectionFactory
specified by
ScenarioConnectionFactoryProducer#withRegularConnectionFactory(ConnectionFactoryProvider)
will be used.
Notice that "production"
and "staging"
for this decision's
point of view are pure synonyms to this Profile.
Notice: If this Profile (or the synonyms) is active, and any of "mats-localhost"
,
"mats-localvm"
or "mats-mocks"
(or any profile which
starts with "mats-mocks") is also active, the setup refuses to start by throwing an Exception - any combination
of "regular", "localhost" and "localvm" is meaningless, while the combination "regular" and any resemblance of
mocks ("mats-mocks") is probably disastrous.
static final java.lang.String PROFILE_PRODUCTION
PROFILE_MATS_REGULAR
wrt. deciding to use the
ConnectionFactory
specified by
ScenarioConnectionFactoryProducer#withRegularConnectionFactory(ConnectionFactoryProvider)
.static final java.lang.String PROFILE_STAGING
PROFILE_MATS_REGULAR
wrt. deciding to use the
ConnectionFactory
specified by
ScenarioConnectionFactoryProducer#withRegularConnectionFactory(ConnectionFactoryProvider)
.static final java.lang.String PROFILE_MATS_LOCALHOST
ScenarioConnectionFactoryProducer#withLocalhostConnectionFactory(ConnectionFactoryProvider)
will be used.static final java.lang.String PROFILE_MATS_LOCALVM
ScenarioConnectionFactoryProducer#withLocalVmConnectionFactory(ConnectionFactoryProvider)
will be used.static final java.lang.String PROFILE_MATS_TEST
PROFILE_MATS_LOCALVM
wrt. deciding to use the
ConnectionFactory
specified by
ScenarioConnectionFactoryProducer#withLocalVmConnectionFactory(ConnectionFactoryProvider)
.
Notice: The @MatsTestProfile
-annotation is a more succinct way of
expressing @ActiveProfiles("mats-test") - it is simply meta-annotated as such.
static final java.lang.String PROFILE_MATS_MOCKS
@Profile("mats-mocks")
(or maybe
@Profile("mats-mocks-orderservice")
), so that when running with Profile "production", these mocks do
not start consuming messages destined for the production OrderService from the production MQ Broker.
A benefit of using this Profile name (or a name that starts with this) for the mocks-scenario, is that if by some
accident both this profile and Profile "mats-regular"
or any of its synonyms is
enabled at the same time, the service will refuse to start, read javaDoc at PROFILE_MATS_REGULAR
.