|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter
public abstract class AbstractCopletAdapter
This is the abstract base adapter to use pipelines as coplets
buffer | Shall the content of the coplet be buffered? If a coplet is buffered, errors local to the coplet are caught and a not availability notice is delivered instead. Buffering does not cache responses for subsequent requests. | boolean | false |
|
---|---|---|---|---|
timeout | Max time in seconds content delivery may take. After a timeout, a not availability notice is delivered. Setting a timeout automatically turns on buffering. | int | null |
Field Summary | |
---|---|
protected ServiceManager |
manager
The service manager |
Fields inherited from interface org.apache.cocoon.portal.coplet.adapter.CopletAdapter |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractCopletAdapter()
|
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. |
protected Object |
getConfiguration(CopletInstanceData coplet,
String key)
Get a configuration value First the coplet data is queried and if it doesn't provide an attribute with the given name, the coplet base data is used. |
protected Object |
getConfiguration(CopletInstanceData coplet,
String key,
Object defaultValue)
Get a configuration value First the coplet data is queried and if it doesn't provide an attribute with the given name, the coplet base data is used. |
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. |
protected boolean |
renderErrorContent(CopletInstanceData coplet,
ContentHandler handler,
Exception error)
Render the error content for a coplet |
void |
service(ServiceManager manager)
|
abstract void |
streamContent(CopletInstanceData coplet,
ContentHandler contentHandler)
Implement this and not toSAX() |
void |
toSAX(CopletInstanceData coplet,
ContentHandler contentHandler)
This method streams the content of a coplet instance data. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ServiceManager manager
Constructor Detail |
---|
public AbstractCopletAdapter()
Method Detail |
---|
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
protected Object getConfiguration(CopletInstanceData coplet, String key)
protected Object getConfiguration(CopletInstanceData coplet, String key, Object defaultValue)
public abstract void streamContent(CopletInstanceData coplet, ContentHandler contentHandler) throws SAXException
SAXException
public void toSAX(CopletInstanceData coplet, ContentHandler contentHandler) throws SAXException
streamContent(CopletInstanceData, ContentHandler)
for creating the content.
toSAX
in interface CopletAdapter
SAXException
CopletAdapter.toSAX(org.apache.cocoon.portal.coplet.CopletInstanceData, org.xml.sax.ContentHandler)
public void init(CopletInstanceData coplet)
CopletAdapter
init
in interface CopletAdapter
coplet
- The copletpublic void destroy(CopletInstanceData coplet)
CopletAdapter
destroy
in interface CopletAdapter
public void login(CopletInstanceData coplet)
CopletAdapter
login
in interface CopletAdapter
public void logout(CopletInstanceData coplet)
CopletAdapter
logout
in interface CopletAdapter
protected boolean renderErrorContent(CopletInstanceData coplet, ContentHandler handler, Exception error) throws SAXException
coplet
- The coplet instance datahandler
- The content handlererror
- The exception that occured
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |