01: /* Copyright 2001 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal;
07:
08: import org.xml.sax.ContentHandler;
09:
10: /**
11: * Internal adaptor class that presents {@link IMultithreadedChannel} as a simple {@link IChannel}
12: * @author Peter Kharchenko {@link <a href="mailto:pkharchenko@interactivebusiness.com">pkharchenko@interactivebusiness.com</a>}
13: * @version $Revision: 36690 $
14: * @see IMultithreadedChannel
15: */
16:
17: public class MultithreadedChannelAdapter implements IChannel {
18: final String uid;
19: final IMultithreadedChannel channel;
20:
21: public MultithreadedChannelAdapter(IMultithreadedChannel channel,
22: String uid) {
23: this .uid = uid;
24: this .channel = channel;
25: }
26:
27: public void setStaticData(ChannelStaticData sd)
28: throws PortalException {
29: channel.setStaticData(sd, this .uid);
30: }
31:
32: public void setRuntimeData(ChannelRuntimeData rd)
33: throws PortalException {
34: channel.setRuntimeData(rd, this .uid);
35: }
36:
37: public void receiveEvent(PortalEvent ev) {
38: channel.receiveEvent(ev, this .uid);
39: }
40:
41: public ChannelRuntimeProperties getRuntimeProperties() {
42: return channel.getRuntimeProperties(this .uid);
43: }
44:
45: public void renderXML(ContentHandler out) throws PortalException {
46: channel.renderXML(out, this.uid);
47: }
48: }
|