org.jasig.portal.channels
Class BaseMultithreadedChannel

java.lang.Object
  extended by org.jasig.portal.channels.BaseMultithreadedChannel
All Implemented Interfaces:
IMultithreadedChannel
Direct Known Subclasses:
CApplet, CImage, CInlineFrame, CPersonAttributes

public abstract class BaseMultithreadedChannel
extends java.lang.Object
implements IMultithreadedChannel

A base class from which channels implementing IMultithreadedChannel interface can be derived. Use this only if you are familiar with the IMultithreadedChannel interface. Channels that extend BaseMultithreadedChannel typically only need to override the renderXML method and should not contain any non-static member variables.

Version:
$Revision: 1.9 $
Author:
Ken Weiner, kweiner@unicon.net

Nested Class Summary
protected  class BaseMultithreadedChannel.ChannelState
          The channel's state including the static data, runtime data, portal event, and a channelData map which is analagous to the session for a servlet - the channel can stash objects in it.
 
Field Summary
protected static java.util.Map channelStateMap
           
protected  org.apache.commons.logging.Log log
          A Commons Logging log instance which will log as the runtime class extending this BaseChannel.
 
Constructor Summary
BaseMultithreadedChannel()
           
 
Method Summary
 ChannelRuntimeProperties getRuntimeProperties(java.lang.String uid)
          Sets channel runtime properties.
 void receiveEvent(PortalEvent ev, java.lang.String uid)
          React to portal events.
 void renderXML(org.xml.sax.ContentHandler out, java.lang.String uid)
          Render nothing.
 void setRuntimeData(ChannelRuntimeData rd, java.lang.String uid)
          Sets the channel runtime data.
 void setStaticData(ChannelStaticData sd, java.lang.String uid)
          Sets the channel static data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

channelStateMap

protected static java.util.Map channelStateMap

log

protected org.apache.commons.logging.Log log
A Commons Logging log instance which will log as the runtime class extending this BaseChannel. Channels extending BaseChannel can use this Log instance rather than instantiating their own.

Constructor Detail

BaseMultithreadedChannel

public BaseMultithreadedChannel()
Method Detail

getRuntimeProperties

public ChannelRuntimeProperties getRuntimeProperties(java.lang.String uid)
Sets channel runtime properties.

Specified by:
getRuntimeProperties in interface IMultithreadedChannel
Parameters:
uid - a unique ID used to identify the state of the channel
Returns:
channel runtime properties

receiveEvent

public void receiveEvent(PortalEvent ev,
                         java.lang.String uid)
React to portal events. Removes channel state from the channel state map when the session expires.

Specified by:
receiveEvent in interface IMultithreadedChannel
Parameters:
ev - a portal event
uid - a unique ID used to identify the state of the channel

setStaticData

public void setStaticData(ChannelStaticData sd,
                          java.lang.String uid)
                   throws PortalException
Sets the channel static data.

Specified by:
setStaticData in interface IMultithreadedChannel
Parameters:
sd - the channel static data
uid - a unique ID used to identify the state of the channel
Throws:
PortalException

setRuntimeData

public void setRuntimeData(ChannelRuntimeData rd,
                           java.lang.String uid)
                    throws PortalException
Sets the channel runtime data.

Specified by:
setRuntimeData in interface IMultithreadedChannel
Parameters:
rd - the channel runtime data
uid - a unique ID used to identify the state of the channel
Throws:
PortalException

renderXML

public void renderXML(org.xml.sax.ContentHandler out,
                      java.lang.String uid)
               throws PortalException
Render nothing.

Specified by:
renderXML in interface IMultithreadedChannel
Parameters:
out - the content handler to which the channel sends SAX events
uid - a unique ID used to identify the state of the channel
Throws:
PortalException