01: /*
02: * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05:
06: package com.sun.portal.harness;
07:
08: import java.util.Vector;
09:
10: class LogSession {
11:
12: LogSession(String dir) {
13: m_Dir = dir;
14: }
15:
16: void clear() {
17: for (int i = 0; i < m_Views.size(); ++i) {
18: LogView lv = (LogView) m_Views.elementAt(i);
19: lv.clearCurrentOutput();
20: }
21: }
22:
23: LogView getView(String nm) {
24: for (int i = 0; i < m_Views.size(); ++i) {
25: LogView lv = (LogView) m_Views.elementAt(i);
26: if (lv.getName().equals(nm)) {
27: return lv;
28: }
29: }
30: LogView lv = new LogView(m_Dir, nm, LogView.MESSAGE);
31: m_Views.add(lv);
32: return lv;
33: }
34:
35: void getViews(Vector v) {
36: for (int i = 0; i < m_Views.size(); ++i) {
37: v.add(m_Views.elementAt(i));
38: }
39: }
40:
41: private Vector m_Views = new Vector();
42: private String m_Dir;
43: }
|