1 4 package com.tcsimulator.listener; 5 6 import com.tc.simulator.listener.ListenerProvider; 7 import com.tc.simulator.listener.OutputListener; 8 import com.tc.simulator.listener.ResultsListener; 9 import com.tc.simulator.listener.StatsListener; 10 import com.tc.simulator.listener.StatsListenerFactory; 11 12 import java.util.Properties ; 13 14 public final class ApplicationListenerProvider implements ListenerProvider { 15 private final OutputListener outputListener; 16 private final ResultsListener resultsListener; 17 private final StatsListenerFactory statsListenerFactory; 18 19 public ApplicationListenerProvider(OutputListener ol, ResultsListener rl, StatsListenerFactory statsListenerFactory) { 20 this.outputListener = ol; 21 this.resultsListener = rl; 22 this.statsListenerFactory = statsListenerFactory; 23 } 24 25 public OutputListener getOutputListener() { 26 return outputListener; 27 } 28 29 public ResultsListener getResultsListener() { 30 return resultsListener; 31 } 32 33 public StatsListener newStatsListener(Properties properties) { 34 return statsListenerFactory.newStatsListener(properties); 35 } 36 37 } | Popular Tags |