Class ComponentServicePostProcessor
java.lang.Object
de.fraunhofer.iese.mydata.registry.ComponentServicePostProcessor
- All Implemented Interfaces:
EventListener,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
public class ComponentServicePostProcessor
extends Object
implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
ApplicationListener that retrieves beans with the annotation
annotationClassOfBean e.g. @PipService
from the created applicationContext to register them as components at the
PMP.-
Constructor Summary
ConstructorsConstructorDescriptionComponentServicePostProcessor(de.fraunhofer.iese.mydata.component.ComponentType type, Class<? extends Annotation> annotationClassOfBean, IMyDataEnvironment myDataEnvironment, String serverUrl, String servletContextPath, String pathPrefix, RestExposeHelper restExposeHelper) -
Method Summary
Modifier and TypeMethodDescriptionvoidonApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) Listening to the event that is generated after context is refreshed (after creation).
-
Constructor Details
-
ComponentServicePostProcessor
public ComponentServicePostProcessor(de.fraunhofer.iese.mydata.component.ComponentType type, Class<? extends Annotation> annotationClassOfBean, IMyDataEnvironment myDataEnvironment, String serverUrl, String servletContextPath, String pathPrefix, @Nullable RestExposeHelper restExposeHelper) - Parameters:
type- Type of the components to create.annotationClassOfBean- Annotation that each service bean has.myDataEnvironment- TheIMyDataEnvironmentthe components should be registered toserverUrl-servletContextPath-pathPrefix-restExposeHelper- theRestExposeHelperbean
-
-
Method Details
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) Listening to the event that is generated after context is refreshed (after creation).- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>- Parameters:
event- Contains the applicationContext that should be discovered.- See Also:
-
ApplicationListener.onApplicationEvent(ApplicationEvent)
-