KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tcsimulator > container > ContainerStateObject


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

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 JavaDoc;
15
16 public class ContainerStateObject implements ContainerState {
17
18   private String JavaDoc containerId;
19   private final LinkedQueue statsOutputQueue;
20
21   public ContainerStateObject(String JavaDoc containerId, LinkedQueue statsOutputQueue) {
22     this.containerId = containerId;
23     this.statsOutputQueue = statsOutputQueue;
24   }
25
26   public String JavaDoc getContainerId() {
27     return containerId;
28   }
29
30   public StatsListener newStatsListener(Properties JavaDoc properties) {
31     return new StatsListenerObject(properties, statsOutputQueue);
32   }
33
34   public OutputListener newOutputListener() {
35     return new OutputListenerObject();
36   }
37
38 }
Popular Tags