1 4 package com.tcsimulator.container; 5 6 import EDU.oswego.cs.dl.util.concurrent.LinkedQueue; 7 8 import com.tc.simulator.container.ContainerState; 9 import com.tc.simulator.listener.OutputListener; 10 import com.tc.simulator.listener.StatsListener; 11 import com.tcsimulator.listener.OutputListenerObject; 12 import com.tcsimulator.listener.StatsListenerObject; 13 14 import java.util.Properties ; 15 16 public class ContainerStateObject implements ContainerState { 17 18 private String containerId; 19 private final LinkedQueue statsOutputQueue; 20 21 public ContainerStateObject(String containerId, LinkedQueue statsOutputQueue) { 22 this.containerId = containerId; 23 this.statsOutputQueue = statsOutputQueue; 24 } 25 26 public String getContainerId() { 27 return containerId; 28 } 29 30 public StatsListener newStatsListener(Properties properties) { 31 return new StatsListenerObject(properties, statsOutputQueue); 32 } 33 34 public OutputListener newOutputListener() { 35 return new OutputListenerObject(); 36 } 37 38 } | Popular Tags |