Class IntegrationGraphServer
java.lang.Object
org.springframework.integration.graph.IntegrationGraphServer
- All Implemented Interfaces:
- EventListener,- Aware,- ApplicationContextAware,- ApplicationListener<ContextRefreshedEvent>
public class IntegrationGraphServer extends Object implements ApplicationContextAware, ApplicationListener<ContextRefreshedEvent>
Builds the runtime object model graph.
- Since:
- 4.3
- Author:
- Gary Russell, Artem Bilan
- 
Constructor SummaryConstructors Constructor Description IntegrationGraphServer()
- 
Method SummaryModifier and Type Method Description protected ApplicationContextgetApplicationContext()protected <T> Map<String,T>getBeansOfType(Class<T> type)Get beans for the provided type from the application context.GraphgetGraph()Return the cached graph.voidonApplicationEvent(ContextRefreshedEvent event)Graphrebuild()Rebuild the graph, re-cache it, and return it.voidsetAdditionalPropertiesCallback(Function<NamedComponent,Map<String,Object>> additionalPropertiesCallback)Specify a callbackFunctionto be called against eachNamedComponentto populate additional properties to the targetIntegrationNode.voidsetApplicationContext(ApplicationContext applicationContext)voidsetApplicationName(String applicationName)Set the application name that will appear in the 'contentDescriptor' under the 'name' key.
- 
Constructor Details- 
IntegrationGraphServerpublic IntegrationGraphServer()
 
- 
- 
Method Details- 
setApplicationContext- Specified by:
- setApplicationContextin interface- ApplicationContextAware
- Throws:
- BeansException
 
- 
getApplicationContext
- 
setApplicationNameSet the application name that will appear in the 'contentDescriptor' under the 'name' key. If not provided, the property 'spring.application.name' from the application context environment will be used (if present).- Parameters:
- applicationName- the application name.
 
- 
setAdditionalPropertiesCallbackpublic void setAdditionalPropertiesCallback(@Nullable Function<NamedComponent,Map<String,Object>> additionalPropertiesCallback)Specify a callbackFunctionto be called against eachNamedComponentto populate additional properties to the targetIntegrationNode.- Parameters:
- additionalPropertiesCallback- the- Functionto use for properties.
- Since:
- 5.1
 
- 
onApplicationEvent- Specified by:
- onApplicationEventin interface- ApplicationListener<ContextRefreshedEvent>
 
- 
getGraphReturn the cached graph. Although the graph is cached, the data therein (stats etc.) are dynamic.- Returns:
- the graph.
- See Also:
- rebuild()
 
- 
rebuildRebuild the graph, re-cache it, and return it. Use this method if the application components have changed (added or removed).- Returns:
- the graph.
- See Also:
- getGraph()
 
- 
getBeansOfTypeGet beans for the provided type from the application context. This method can be extended for some custom logic, e.g. get beans from the parent application context as well.- Type Parameters:
- T- the type for beans to obtain
- Parameters:
- type- the type for beans to obtain
- Returns:
- a Mapof bean for the provided type
- Since:
- 5.1
 
 
-