Interface MatsProfiles
-
- All Known Implementing Classes:
ScenarioConnectionFactoryProducer
public interface MatsProfilesSpecifies Spring Profiles (and also which Spring Environment variables) that are relevant for Mats when used with conjunction withScenarioConnectionFactoryProducerand the default configuration ofConfigurableScenarioDecider. The latter both checks the Spring Profiles for active profiles with the names (or, forPROFILE_MATS_TEST, name prefix) specified here, but also checks the SpringEnvironmentfor 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 ofScenarioConnectionFactoryProducer.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROFILE_MATS_LOCALHOSTIf this Spring Profile ("mats-localhost") is active, the ConnectionFactory specified byScenarioConnectionFactoryProducer.withLocalhostConnectionFactory(ConnectionFactoryProvider)will be used.static java.lang.StringPROFILE_MATS_LOCALVMIf this Spring Profile ("mats-localvm") is active, the ConnectionFactory specified byScenarioConnectionFactoryProducer.withLocalVmConnectionFactory(ConnectionFactoryProvider)will be used.static java.lang.StringPROFILE_MATS_MOCKSSuggested 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.StringPROFILE_MATS_REGULARIf this Spring Profile ("mats-regular") is active, theConnectionFactoryspecified byScenarioConnectionFactoryProducer.withRegularConnectionFactory(ConnectionFactoryProvider)will be used.static java.lang.StringPROFILE_MATS_TESTProfile name ("mats-test") that is a synonym toPROFILE_MATS_LOCALVMwrt.static java.lang.StringPROFILE_PRODUCTIONCommon Profile name ("production") that is a synonym toPROFILE_MATS_REGULARwrt.static java.lang.StringPROFILE_STAGINGCommon Profile name ("staging") that is a synonym toPROFILE_MATS_REGULARwrt.
-
-
-
Field Detail
-
PROFILE_MATS_REGULAR
static final java.lang.String PROFILE_MATS_REGULAR
If this Spring Profile ("mats-regular") is active, theConnectionFactoryspecified byScenarioConnectionFactoryProducer.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.- See Also:
- Constant Field Values
-
PROFILE_PRODUCTION
static final java.lang.String PROFILE_PRODUCTION
Common Profile name ("production") that is a synonym toPROFILE_MATS_REGULARwrt. deciding to use theConnectionFactoryspecified byScenarioConnectionFactoryProducer.withRegularConnectionFactory(ConnectionFactoryProvider).- See Also:
- Constant Field Values
-
PROFILE_STAGING
static final java.lang.String PROFILE_STAGING
Common Profile name ("staging") that is a synonym toPROFILE_MATS_REGULARwrt. deciding to use theConnectionFactoryspecified byScenarioConnectionFactoryProducer.withRegularConnectionFactory(ConnectionFactoryProvider).- See Also:
- Constant Field Values
-
PROFILE_MATS_LOCALHOST
static final java.lang.String PROFILE_MATS_LOCALHOST
If this Spring Profile ("mats-localhost") is active, the ConnectionFactory specified byScenarioConnectionFactoryProducer.withLocalhostConnectionFactory(ConnectionFactoryProvider)will be used.- See Also:
- Constant Field Values
-
PROFILE_MATS_LOCALVM
static final java.lang.String PROFILE_MATS_LOCALVM
If this Spring Profile ("mats-localvm") is active, the ConnectionFactory specified byScenarioConnectionFactoryProducer.withLocalVmConnectionFactory(ConnectionFactoryProvider)will be used.- See Also:
- Constant Field Values
-
PROFILE_MATS_TEST
static final java.lang.String PROFILE_MATS_TEST
Profile name ("mats-test") that is a synonym toPROFILE_MATS_LOCALVMwrt. deciding to use theConnectionFactoryspecified byScenarioConnectionFactoryProducer.withLocalVmConnectionFactory(ConnectionFactoryProvider).Notice: The
@MatsTestProfile-annotation is a more succinct way of expressing @ActiveProfiles("mats-test") - it is simply meta-annotated as such.- See Also:
- Constant Field Values
-
PROFILE_MATS_MOCKS
static final 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. Point is that if this e.g. ShoppingCartService needs to talk to the OrderService, you will obviously not have the OrderService Mats Endpoints available when running the ShoppingCartService inside your IDE with an in-vm Local Broker instance. Thus, you mock these out - but annotated with@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 atPROFILE_MATS_REGULAR.- See Also:
- Constant Field Values
-
-