KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > impl > WindowObjectRequestMonitor


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.tc.objectserver.impl;
5
6 import com.tc.objectserver.api.ObjectRequestMonitor;
7 import com.tc.objectserver.context.ManagedObjectRequestContext;
8 import com.tc.text.PrettyPrinter;
9 import com.tc.util.WindowUtil;
10
11 public class WindowObjectRequestMonitor implements ObjectRequestMonitor {
12
13   private final WindowUtil window;
14   
15   public WindowObjectRequestMonitor(int size) {
16     window = new WindowUtil(size);
17   }
18   
19   public void notifyObjectRequest(ManagedObjectRequestContext ctxt) {
20     window.add(ctxt);
21   }
22
23   public PrettyPrinter prettyPrint(PrettyPrinter out) {
24     out.println("WindowObjectRequestMonitor");
25     out.duplicateAndIndent().indent().visit(window);
26     return out;
27   }
28
29 }
30
Popular Tags