001: // @@
002: // @@
003: /*
004: * Wi.Ser Framework
005: *
006: * Version: 1.8.1, 20-September-2007
007: * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library located in LGPL.txt in the
021: * license directory; if not, write to the
022: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
023: * Boston, MA 02111-1307, USA.
024: *
025: * If this agreement does not cover your requirements, please contact us
026: * via email to get detailed information about the commercial license
027: * or our service offerings!
028: *
029: */
030: // @@
031: package de.ug2t.unifiedGui.session;
032:
033: import java.io.*;
034: import java.util.*;
035:
036: import javax.servlet.http.*;
037:
038: import com.thoughtworks.xstream.*;
039:
040: import de.ug2t.channel.markup.service.*;
041: import de.ug2t.kernel.*;
042: import de.ug2t.unifiedGui.interfaces.*;
043:
044: public class UnFailoverSessionWrapper implements Serializable,
045: HttpSessionBindingListener {
046: private UnFailoverSession pem_failoverSession = null;
047: private transient MuApplInstanceDispatcher pem_disp = null;
048:
049: public UnFailoverSessionWrapper(UnFailoverSession xFoSession) {
050: this .pem_failoverSession = xFoSession;
051: }
052:
053: public UnFailoverSessionWrapper(KeObjectStorage xCtx,
054: IUnApplication xAppl) {
055: this .pem_failoverSession = new UnFailoverSession(xCtx, xAppl);
056: }
057:
058: public UnFailoverSessionWrapper(MuApplInstanceDispatcher xDisp,
059: KeObjectStorage xCtx, IUnApplication xAppl) {
060: this .pem_disp = xDisp;
061: this .pem_failoverSession = new UnFailoverSession(xCtx, xAppl);
062: }
063:
064: public void pcmf_setDisp(MuApplInstanceDispatcher xDisp,
065: HttpSession xSession) {
066: this .pem_disp = xDisp;
067: xDisp.valueBound(new HttpSessionBindingEvent(xSession, ""));
068: }
069:
070: public KeObjectStorage pcmf_getContext() {
071: return (this .pem_failoverSession.pdm_context);
072: }
073:
074: public IUnApplication pcmf_getAppl() {
075: return (this .pem_failoverSession.pdm_appl);
076: }
077:
078: // @@
079:
080: public void valueBound(HttpSessionBindingEvent event) {
081: if (this .pem_disp != null)
082: this .pem_disp.valueBound(event);
083:
084: if (this .pem_failoverSession.pdm_appl instanceof HttpSessionBindingListener)
085: ((HttpSessionBindingListener) this .pem_failoverSession.pdm_appl)
086: .valueBound(event);
087:
088: return;
089: };
090:
091: public void valueUnbound(HttpSessionBindingEvent event) {
092: if (this .pem_disp != null)
093: this .pem_disp.valueUnbound(event);
094:
095: if (this .pem_failoverSession.pdm_appl instanceof HttpSessionBindingListener)
096: ((HttpSessionBindingListener) this.pem_failoverSession.pdm_appl)
097: .valueUnbound(event);
098:
099: return;
100: };
101: }
|