org.apache.cocoon.portal.coplet.adapter
Interface CopletAdapter

All Known Implementing Classes:
AbstractCopletAdapter

public interface CopletAdapter

This is the "portlet" implementation. A coplet adapter is the interface between the portal engine and the implementation of a coplet. Usually there is only one instance of an adapter (= singleton). Whenever an instance of this coplet is rendered, the adapter is invoked to render the coplet. The behaviour of the adapter can be controlled by a set of parameters. In general, the coplet base data defines the default for all coplets, but the value can be overriden by the coplet data. The coplet base data stores the information in the coplet config map whereas the coplet data stores them in the attributes. Apart from that the keys and the data types are the same. Configuration: buffer - A boolean value (default is false) that defines if the xml data stream from the coplet is buffered. If the stream is not buffered and an exception occurs then the whole portal will be rendered invalid. timeout - An integer value (default is endless) that defines the maximum time (in seconds) the coplet has to deliver it's content. If the timeout is reached the content is assumed as not gettable. If you set a timeout, the content is automatically buffered. Each implementation should extend the AbstractCopletAdapter to be prepared for possible extensions to this interface in future versions.

Version:
$Id: CopletAdapter.java 322495 2005-10-16 17:52:43Z cziegeler $

Field Summary
static String ROLE
           
 
Method Summary
 void destroy(CopletInstanceData coplet)
          Destroy the coplet This method is invoked when a coplet instance will be destroyed For each coplet, this method is only invoked once.
 void init(CopletInstanceData coplet)
          Initialize the coplet This method is called immediately after a new instance is created.
 void login(CopletInstanceData coplet)
          User logs in to a coplet This method is invoked when a user logs in for each coplet instance of the user
 void logout(CopletInstanceData coplet)
          User logs out from a coplet This method is invoked when a user logs out for each coplet instance of this user.
 void toSAX(CopletInstanceData coplet, ContentHandler contentHandler)
          Stream the content of the coplet
 

Field Detail

ROLE

public static final String ROLE
Method Detail

init

public void init(CopletInstanceData coplet)
Initialize the coplet This method is called immediately after a new instance is created. For each coplet, this method is only invoked once.

Parameters:
coplet - The coplet

destroy

public void destroy(CopletInstanceData coplet)
Destroy the coplet This method is invoked when a coplet instance will be destroyed For each coplet, this method is only invoked once.

Parameters:
coplet -

toSAX

public void toSAX(CopletInstanceData coplet,
                  ContentHandler contentHandler)
           throws SAXException
Stream the content of the coplet

Throws:
SAXException

login

public void login(CopletInstanceData coplet)
User logs in to a coplet This method is invoked when a user logs in for each coplet instance of the user


logout

public void logout(CopletInstanceData coplet)
User logs out from a coplet This method is invoked when a user logs out for each coplet instance of this user.



Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.