01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tcsimulator.container;
05:
06: import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
07:
08: import com.tc.simulator.container.ContainerState;
09: 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,
22: LinkedQueue statsOutputQueue) {
23: this .containerId = containerId;
24: this .statsOutputQueue = statsOutputQueue;
25: }
26:
27: public String getContainerId() {
28: return containerId;
29: }
30:
31: public StatsListener newStatsListener(Properties properties) {
32: return new StatsListenerObject(properties, statsOutputQueue);
33: }
34:
35: public OutputListener newOutputListener() {
36: return new OutputListenerObject();
37: }
38:
39: }
|