public class IntegrationGraphServer extends Object implements ApplicationContextAware, ApplicationListener<ContextRefreshedEvent>
Constructor and Description |
---|
IntegrationGraphServer() |
Modifier and Type | Method and Description |
---|---|
protected ApplicationContext |
getApplicationContext() |
protected <T> Map<String,T> |
getBeansOfType(Class<T> type)
Get beans for the provided type from the application context.
|
Graph |
getGraph()
Return the cached graph.
|
void |
onApplicationEvent(ContextRefreshedEvent event) |
Graph |
rebuild()
Rebuild the graph, re-cache it, and return it.
|
void |
setAdditionalPropertiesCallback(java.util.function.Function<NamedComponent,Map<String,Object>> additionalPropertiesCallback)
Specify a callback
Function to be called against each NamedComponent
to populate additional properties to the target IntegrationNode . |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setApplicationName(String applicationName)
Set the application name that will appear in the 'contentDescriptor' under
the 'name' key.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forPayload
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
protected ApplicationContext getApplicationContext()
public void setApplicationName(String applicationName)
applicationName
- the application name.public void setAdditionalPropertiesCallback(@Nullable java.util.function.Function<NamedComponent,Map<String,Object>> additionalPropertiesCallback)
Function
to be called against each NamedComponent
to populate additional properties to the target IntegrationNode
.additionalPropertiesCallback
- the Function
to use for properties.public void onApplicationEvent(ContextRefreshedEvent event)
onApplicationEvent
in interface ApplicationListener<ContextRefreshedEvent>
public Graph getGraph()
rebuild()
public Graph rebuild()
getGraph()
protected <T> Map<String,T> getBeansOfType(Class<T> type)
T
- the type for beans to obtaintype
- the type for beans to obtainMap
of bean for the provided type