Package org.saidone.component
Class BaseComponent
java.lang.Object
org.saidone.component.BaseComponent
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
AbstractNodeCollector,AbstractNodeProcessor,AlfrescoNodeProcessorApplicationRunner,AlfrescoNodeProcessorConfiguration,LockService,NodesApiReadOnlyAspect,StatsLoggerService
public class BaseComponent
extends Object
implements org.springframework.context.ApplicationContextAware
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetApplicationContext(@NonNull org.springframework.context.ApplicationContext applicationContext) Stores the active SpringApplicationContextfor later shutdown.voidshutDown(int exitCode) Closes the Spring context and exits the JVM.voidstart()Called after dependency injection is complete.voidstop()Called just before the bean is destroyed.
-
Constructor Details
-
BaseComponent
public BaseComponent()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(@NonNull @NonNull org.springframework.context.ApplicationContext applicationContext) Stores the active SpringApplicationContextfor later shutdown.- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Parameters:
applicationContext- the current application context
-
start
@PostConstruct public void start()Called after dependency injection is complete. Logs a startup message indicating that the component is ready. -
stop
@PreDestroy public void stop()Called just before the bean is destroyed. Logs a shutdown message indicating that the component is stopping. -
shutDown
public void shutDown(int exitCode) Closes the Spring context and exits the JVM.- Parameters:
exitCode- process exit status returned to the operating system
-