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