1 16 package org.springframework.webflow.execution.factory; 17 18 import org.springframework.util.Assert; 19 import org.springframework.webflow.definition.FlowDefinition; 20 import org.springframework.webflow.execution.FlowExecutionListener; 21 22 31 public final class StaticFlowExecutionListenerLoader implements FlowExecutionListenerLoader { 32 33 36 public static final FlowExecutionListenerLoader EMPTY_INSTANCE = new StaticFlowExecutionListenerLoader(); 37 38 42 private final FlowExecutionListener[] listeners; 43 44 48 private StaticFlowExecutionListenerLoader() { 49 this(new FlowExecutionListener[0]); 50 } 51 52 57 public StaticFlowExecutionListenerLoader(FlowExecutionListener listener) { 58 this(new FlowExecutionListener[] { listener }); 59 } 60 61 67 public StaticFlowExecutionListenerLoader(FlowExecutionListener[] listeners) { 68 Assert.notNull(listeners, "The flow execution listener array is required"); 69 this.listeners = listeners; 70 } 71 72 public FlowExecutionListener[] getListeners(FlowDefinition flowDefinition) { 73 return listeners; 74 } 75 } | Popular Tags |