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.tc.objectserver.impl;
05:
06: import com.tc.objectserver.api.ObjectRequestMonitor;
07: import com.tc.objectserver.context.ManagedObjectRequestContext;
08: import com.tc.text.PrettyPrinter;
09: 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: }
|