public abstract class Config extends Object
Config class defines the current configuration.
All the project-specific dependencies can be customized,
like the EventHandler, EventFilter,
EventDecorator, EventSender or the
ExceptionHandler.
| Modifier and Type | Class and Description |
|---|---|
static class |
Config.EventPersistence
The
Config.Property.EventPersistence configuration activates and tunes the feature that stores the
detected events into a database table over time. |
static class |
Config.Jmx
JMX configuration.
|
static class |
Config.Property |
| Constructor and Description |
|---|
Config()
Initializing constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Config |
addEventHandler(EventHandler eventHandler)
Add the provided
EventHandler. |
EventDecorator |
getEventDecorator()
Get the current
EventDecorator. |
EventFilter |
getEventFilter()
Get the current
EventFilter. |
EventHandler |
getEventHandler()
Get the current
EventHandler. |
List<EventHandler> |
getEventHandlers()
Get the
EventHandler list. |
Config.EventPersistence |
getEventPersistence()
Get the event persistence configuration.
|
EventSender |
getEventSender()
Get the current
EventSender. |
ExceptionHandler |
getExceptionHandler()
Get the current
ExceptionHandler. |
Config.Jmx |
getJmx()
Get the JMX configuration.
|
Map<String,Object> |
getProperties()
Get runtime properties that can override default settings.
|
boolean |
isBannerPrintingEnabled()
Check if the banner printing is enabled.
|
boolean |
isConfigurationScannerEnabled()
Check if the configuration scanner enabled.
|
boolean |
isMappingScannerEnabled()
Check if the mapping scanner enabled.
|
boolean |
isRuntimeScannerEnabled()
Check if the runtime scanner enabled.
|
void |
mergeProperties(Map<String,Object> factoryProperties)
Merge the JPA
EntityManagerFactory or the
Hibernate SessionFactory properties with the Hypersistence ones,
and call the PropertiesSetter objects. |
Config |
setBannerPrintingEnabled(boolean bannerPrintingEnabled)
Enable or disable the banner printing.
|
Config |
setConfigurationScannerEnabled(boolean configurationScannerEnabled)
Enable or disable the configuration scanner.
|
Config |
setEventDecorator(EventDecorator eventDecorator)
Set the current
EventDecorator. |
Config |
setEventFilter(EventFilter eventFilter)
Set the current
EventFilter. |
Config |
setEventHandler(EventHandler eventHandler)
Set the current
EventHandler. |
Config |
setEventPersistence(Config.EventPersistence eventPersistence)
Set the event persistence configuration.
|
Config |
setEventSender(EventSender eventSender)
Set the current
EventSender. |
Config |
setExceptionHandler(ExceptionHandler exceptionHandler)
Set the current
ExceptionHandler. |
Config |
setJmx(Config.Jmx jmxConfig)
Set the JMX configuration.
|
Config |
setMappingScannerEnabled(boolean mappingScannerEnabled)
Enable or disable the mapping scanner.
|
Config |
setMetadataScannersEnabled(boolean metadataScannerEnabled)
Enable or disable the metadata scanners (mapping and configuration).
|
Config |
setProperties(Map<String,Object> properties)
Set runtime properties that can override default settings.
|
Config |
setRuntimeScannerEnabled(boolean runtimeScannerEnabled)
Enable or disable the runtime scanner.
|
public EventHandler getEventHandler()
EventHandler.EventHandlerpublic Config setEventHandler(EventHandler eventHandler)
EventHandler.eventHandler - current EventHandlerConfigpublic Config addEventHandler(EventHandler eventHandler)
EventHandler.eventHandler - provided EventHandlerConfigpublic EventFilter getEventFilter()
EventFilter.EventFilterpublic Config setEventFilter(EventFilter eventFilter)
EventFilter.eventFilter - current EventFilterConfigpublic EventDecorator getEventDecorator()
EventDecorator.EventDecoratorpublic Config setEventDecorator(EventDecorator eventDecorator)
EventDecorator.eventDecorator - current EventDecoratorConfigpublic EventSender getEventSender()
EventSender.EventSenderpublic Config setEventSender(EventSender eventSender)
EventSender.eventSender - current EventSenderConfigpublic ExceptionHandler getExceptionHandler()
ExceptionHandler.ExceptionHandlerpublic Config setExceptionHandler(ExceptionHandler exceptionHandler)
ExceptionHandler.exceptionHandler - current ExceptionHandlerConfigpublic boolean isMappingScannerEnabled()
public Config setMappingScannerEnabled(boolean mappingScannerEnabled)
mappingScannerEnabled - if the mapping scanner is to be enabledConfigpublic boolean isConfigurationScannerEnabled()
public Config setConfigurationScannerEnabled(boolean configurationScannerEnabled)
configurationScannerEnabled - if the configuration scanner is to be enabledConfigpublic Config setMetadataScannersEnabled(boolean metadataScannerEnabled)
setMappingScannerEnabled(boolean) and
setConfigurationScannerEnabled(boolean) with the current configurationScannerEnabled
argument.metadataScannerEnabled - if the mapping and configuration scanners are to be enabledConfigpublic boolean isRuntimeScannerEnabled()
public Config setRuntimeScannerEnabled(boolean runtimeScannerEnabled)
runtimeScannerEnabled - if the runtime scanner is to be enabledConfigpublic boolean isBannerPrintingEnabled()
public Config setBannerPrintingEnabled(boolean bannerPrintingEnabled)
bannerPrintingEnabled - if the banner printing is to be enabledConfigpublic List<EventHandler> getEventHandlers()
EventHandler list.EventHandler listpublic Map<String,Object> getProperties()
public Config setProperties(Map<String,Object> properties)
properties - runtime propertiesConfigpublic Config.Jmx getJmx()
public Config setJmx(Config.Jmx jmxConfig)
jmxConfig - JMX configurationConfigpublic Config.EventPersistence getEventPersistence()
public Config setEventPersistence(Config.EventPersistence eventPersistence)
Config.Property.EventPersistence activates the feature that stores the detected events into a
database table over time.eventPersistence - the event persistence configurationConfigpublic void mergeProperties(Map<String,Object> factoryProperties)
EntityManagerFactory or the
Hibernate SessionFactory properties with the Hypersistence ones,
and call the PropertiesSetter objects.factoryProperties - factory propertiesCopyright © 2026. All rights reserved.