01: // @@
02: // @@
03: /*
04: * Wi.Ser Framework
05: *
06: * Version: 1.8.1, 20-September-2007
07: * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
08: *
09: * This library is free software; you can redistribute it and/or
10: * modify it under the terms of the GNU Lesser General Public
11: * License as published by the Free Software Foundation; either
12: * version 2 of the License, or (at your option) any later version.
13: *
14: * This library is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17: * Lesser General Public License for more details.
18: *
19: * You should have received a copy of the GNU Lesser General Public
20: * License along with this library located in LGPL.txt in the
21: * license directory; if not, write to the
22: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23: * Boston, MA 02111-1307, USA.
24: *
25: * If this agreement does not cover your requirements, please contact us
26: * via email to get detailed information about the commercial license
27: * or our service offerings!
28: *
29: */
30: // @@
31: package de.ug2t.channel.ho.session;
32:
33: import java.awt.event.*;
34:
35: import de.ug2t.kernel.*;
36: import de.ug2t.unifiedGui.interfaces.*;
37:
38: public class HoSessionTimeoutTimer implements ActionListener {
39: private IHoSession pem_session = null;
40: private String pem_id = null;
41: private IKeExecutable pem_cleaner = null;
42:
43: public HoSessionTimeoutTimer(IHoSession xSession, String xId,
44: IKeExecutable xCleaner) {
45: this .pem_session = xSession;
46: this .pem_id = xId;
47: this .pem_cleaner = xCleaner;
48: }
49:
50: public void actionPerformed(ActionEvent e) {
51: synchronized (pem_session) {
52: IUnApplication l_appl = (IUnApplication) this .pem_session
53: .pcmf_getCtxValue(IUnApplication.MY_APPL);
54:
55: String l_tname = Thread.currentThread().getName();
56: try {
57: Thread.currentThread().setName(this .pem_id);
58:
59: l_appl.pcmf_getUnComponent().pcmf_setValue(
60: IUnApplication.APPL_CLOSING);
61: if (!l_appl.pcmf_getUnComponent().pcmf_isDeleted()) {
62: l_appl.pcmf_getUnComponent().pcmf_setRefresh();
63: l_appl.pcmf_getUnComponent().pcmf_dispatchEvent();
64: this .pem_session.pcmf_kill();
65: }
66: this .pem_cleaner.pcmf_execObj(this .pem_id);
67: } catch (Exception ex) {
68: KeLog
69: .pcmf_log(
70: l_appl.pcmf_getUnComponent()
71: .pcmf_getName(),
72: "error during 'web application closing' event dispatch",
73: this, KeLog.ERROR);
74: KeLog.pcmf_logException(l_appl.pcmf_getUnComponent()
75: .pcmf_getName(), this, ex);
76: }
77: Thread.currentThread().setName(l_tname);
78: }
79: }
80: }
|