01: package org.jacorb.poa;
02:
03: /*
04: * JacORB - a free Java ORB
05: *
06: * Copyright (C) 1997-2004 Gerald Brose.
07: *
08: * This library is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU Library General Public
10: * License as published by the Free Software Foundation; either
11: * version 2 of the License, or (at your option) any later version.
12: *
13: * This library is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * Library General Public License for more details.
17: *
18: * You should have received a copy of the GNU Library General Public
19: * License along with this library; if not, write to the Free
20: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21: */
22:
23: import org.apache.avalon.framework.logger.Logger;
24: import org.apache.avalon.framework.configuration.*;
25:
26: import org.jacorb.poa.gui.*;
27: import org.jacorb.util.ObjectUtil;
28:
29: /**
30: * A lightweight implementation of a POAManager monitor
31: *
32: * @author Reimo Tiedemann, FU Berlin
33: * @version 1.03, 12/08/99, RT
34: */
35:
36: public class POAManagerMonitorLightImpl implements POAManagerMonitor,
37: Configurable {
38: private POAManager model = null;
39:
40: private org.jacorb.config.Configuration configuration = null;
41: private Logger logger;
42: private boolean doMonitor;
43:
44: public void addPOA(String name) {
45: }
46:
47: public void closeMonitor() {
48: }
49:
50: public void init(POAManager poaManager) {
51: model = poaManager;
52: }
53:
54: public void configure(Configuration myConfiguration)
55: throws ConfigurationException {
56: this .configuration = (org.jacorb.config.Configuration) myConfiguration;
57: logger = configuration
58: .getNamedLogger("jacorb.poa.manager_monitor");
59: doMonitor = configuration.getAttributeAsBoolean(
60: "jacorb.poa.monitoring", false);
61: }
62:
63: public void openMonitor() {
64: if (doMonitor) {
65: try {
66: POAManagerMonitor newMonitor = (POAManagerMonitor) ObjectUtil
67: .classForName(
68: "org.jacorb.poa.POAManagerMonitorImpl")
69: .newInstance();
70: newMonitor.init(model);
71: newMonitor.configure(configuration);
72: model.setMonitor(newMonitor);
73: newMonitor.openMonitor();
74: } catch (Throwable exception) {
75: if (logger.isErrorEnabled())
76: logger.error("Exception in closeMonitor(): "
77: + exception.getMessage());
78: }
79: }
80: }
81:
82: public void printMessage(String str) {
83: }
84:
85: public void removePOA(String name) {
86: }
87:
88: public void setToActive() {
89: }
90:
91: public void setToDiscarding(boolean wait) {
92: }
93:
94: public void setToHolding(boolean wait) {
95: }
96:
97: public void setToInactive(boolean wait, boolean etherialize) {
98: }
99: }
|