Search in sources :

Example 1 with InputBindingLifecycle

use of org.springframework.cloud.stream.binding.InputBindingLifecycle in project spring-cloud-stream by spring-cloud.

the class BindingsEndpoint method gatherInputBindings.

@SuppressWarnings("unchecked")
private List<Binding<?>> gatherInputBindings() {
    List<Binding<?>> inputBindings = new ArrayList<>();
    for (InputBindingLifecycle inputBindingLifecycle : this.inputBindingLifecycles) {
        Collection<Binding<?>> lifecycleInputBindings = (Collection<Binding<?>>) new DirectFieldAccessor(inputBindingLifecycle).getPropertyValue("inputBindings");
        inputBindings.addAll(lifecycleInputBindings);
    }
    return inputBindings;
}
Also used : Binding(org.springframework.cloud.stream.binder.Binding) DirectFieldAccessor(org.springframework.beans.DirectFieldAccessor) ArrayList(java.util.ArrayList) InputBindingLifecycle(org.springframework.cloud.stream.binding.InputBindingLifecycle) Collection(java.util.Collection)

Aggregations

ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 DirectFieldAccessor (org.springframework.beans.DirectFieldAccessor)1 Binding (org.springframework.cloud.stream.binder.Binding)1 InputBindingLifecycle (org.springframework.cloud.stream.binding.InputBindingLifecycle)1