Class ChenileConfiguration
java.lang.Object
org.chenile.core.model.ChenileConfiguration
The core class that contains the entire ChenileConfiguration.
This contains the configuration information from chenile.properties as well as
a reference to all the configured services and events in Chenile
- Author:
- Raja Shankar Kolluru
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ApplicationContextprivate Stringprivate ChenileExceptionHandlerprivate Stringprivate Stringprivate Map<String, ChenileEventDefinition> private StringLeaving room for other extensions hereprivate List<Command<ChenileExchange>> private Stringprivate List<Command<ChenileExchange>> private Stringprivate Map<String, ChenileServiceDefinition> private final Map<String, TrajectoryDefinition> private String -
Constructor Summary
ConstructorsConstructorDescriptionChenileConfiguration(String monolithName, ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEvent(ChenileEventDefinition event) voidaddPostProcessors(String postProcessors) voidaddPreProcessors(String preProcessors) voidaddTrajectory(TrajectoryDefinition trajectoryDefinition) voidaddVersion(String key, String value) Deprecated.The deployable-wide post-processors configured inchenile.post.processors.The deployable-wide pre-processors configured inchenile.pre.processors.getVersion(String moduleOrServiceName) private List<Command<ChenileExchange>> resolveCommands(String names, String property) Builds the complete command list in a local variable and returns it only if every name resolved.voidsetBaseUrl(String baseUrl) voidsetChenileExceptionHandlerName(String exceptionHandlerName) voidsetEventLoggerName(String eventLoggerName) voidsetOtherExtensions(Map<String, Map<String, ?>> otherExtensions) voidsetService(String serviceName, ChenileServiceDefinition service) voidsetVersion(String version) voidsetVersions(Map<String, String> versions) voidResolves every deployable-wide interceptor (pre-processors, post-processors and the exception handler) so that a misspelt or mistyped bean name fails the application at startup rather than the first request.
-
Field Details
-
applicationContext
ApplicationContext applicationContext -
baseUrl
-
monolithName
-
preProcessorCommands
-
postProcessorCommands
-
chenileExceptionHandler
-
preProcessorNames
-
postProcessorNames
-
version
-
versions
-
services
-
events
-
otherExtensions
-
chenileExceptionHandlerName
-
eventLoggerName
-
trajectoryDefinitions
-
-
Constructor Details
-
ChenileConfiguration
-
-
Method Details
-
getBaseUrl
-
setBaseUrl
-
getEventLoggerName
-
setEventLoggerName
-
getServices
-
setService
-
getMonolithName
-
getModuleName
Deprecated. -
addPreProcessors
-
addPostProcessors
-
getPreProcessorCommands
The deployable-wide pre-processors configured inchenile.pre.processors. Resolved once, all or nothing: if any configured name cannot be resolved, aConfigurationExceptionis thrown and nothing is cached, so a later call fails the same way instead of silently running a partial list. Normally resolved at startup byvalidateInterceptors().- Returns:
- the pre-processor commands, or null if none are configured
-
getPostProcessorCommands
The deployable-wide post-processors configured inchenile.post.processors. Same all-or-nothing semantics asgetPreProcessorCommands().- Returns:
- the post-processor commands, or null if none are configured
-
validateInterceptors
public void validateInterceptors()Resolves every deployable-wide interceptor (pre-processors, post-processors and the exception handler) so that a misspelt or mistyped bean name fails the application at startup rather than the first request. Called byChenileInterceptorValidator.- Throws:
ConfigurationException- if any of them cannot be resolved
-
resolveCommands
Builds the complete command list in a local variable and returns it only if every name resolved. Blank entries and surrounding spaces ("a, b,") are tolerated. -
getEvents
-
addEvent
-
getOtherExtensions
-
setOtherExtensions
-
setChenileExceptionHandlerName
-
getChenileExceptionHandler
-
getVersion
-
getVersion
-
setVersion
-
getVersions
-
setVersions
-
addVersion
-
getEventLogger
-
getTrajectories
-
addTrajectory
-
CHENILE