public class DependencyGraphLifecycleObjectSorter extends Object implements LifecycleObjectSorter
DefaultLifecycleObjectSorter which uses an AbstractSpringRegistry to not only consider the
provided objects but the beans on which that object depends on. This is accomplished by introspecting the
BeanDefinition that was derived from the Inject annotations. This sorter was introduced to replace
SpringLifecycleObjectSorter.| Modifier and Type | Field and Description |
|---|---|
protected Class<?>[] |
orderedLifecycleTypes |
| Constructor and Description |
|---|
DependencyGraphLifecycleObjectSorter(DependencyGraphBeanDependencyResolver resolver,
Class<?>[] orderedLifecycleTypes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addObject(String beanName,
Object currentObject)
Building a single dependency graph(bucket) for each lifecycle type
|
List<Object> |
getSortedObjects()
The objects in each graph(bucket) will be sorted based on the topological order.
|
void |
setLifeCycleObjectNameOrder(List<String> lookupObjects)
Provides the information that will be needed for the comparison during the top sort
|
protected final Class<?>[] orderedLifecycleTypes
public DependencyGraphLifecycleObjectSorter(DependencyGraphBeanDependencyResolver resolver, Class<?>[] orderedLifecycleTypes)
public void addObject(String beanName, Object currentObject)
addObject in interface LifecycleObjectSorterbeanName - current object(bean)'s name to resolve dependenciescurrentObject - current object that is going to be added to the graph(bucket)public List<Object> getSortedObjects()
getSortedObjects in interface LifecycleObjectSorterpublic void setLifeCycleObjectNameOrder(List<String> lookupObjects)
setLifeCycleObjectNameOrder in interface LifecycleObjectSorterlookupObjects - lifecycle object list which is ordered based on the typeCopyright © 2003–2022 MuleSoft, Inc.. All rights reserved.