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
ConstructorDescriptionComponentServicePostProcessor
(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 TypeMethodDescriptionvoid
onApplicationEvent
(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
- TheIMyDataEnvironment
the components should be registered toserverUrl
-servletContextPath
-pathPrefix
-restExposeHelper
- theRestExposeHelper
bean
-
-
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:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
- Parameters:
event
- Contains the applicationContext that should be discovered.- See Also:
-
ApplicationListener.onApplicationEvent(ApplicationEvent)
-