com.uwyn.rife.engine
Class Element

java.lang.Object
  extended by com.uwyn.rife.engine.ElementSupport
      extended by com.uwyn.rife.engine.Element
All Implemented Interfaces:
ContinuableObject, ElementAware, Cloneable
Direct Known Subclasses:
AbstractLogout, Defer, DwrService, ElementScripted, FeedProvider, Identified, PrintTemplate, Redirect, ServeContent, SoapXFire, Uncached, WebservicesHessian

public abstract class Element
extends ElementSupport
implements ElementAware, Cloneable

This is a convenience abstract class that implements the ElementAware interface and extends the ElementSupport class.

There are no mandatory abstract methods to implement and all ElementSupport methods are local.

Additionally, the clone() method is implemented to provide as good as possible default behaviour for continuations usage.

Since:
1.0
Version:
$Revision: 3777 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)

Constructor Summary
protected Element()
          No-op default constructor that can only be used by extending classes.
 
Method Summary
 Object clone()
          Provides default cloning behavior by trying to make deep clones of all member variables, correctly handling primitives and collections.
 void noticeElement(ElementSupport element)
          This method is called immediately after the instantiation of the element to provide the support object that allows the element to function in the current context.
 void processElement()
          The default entry point that will be called when a request arrives.
 
Methods inherited from class com.uwyn.rife.engine.ElementSupport
addDateHeader, addHeader, addIntHeader, addOutputValue, addOutputValue, addOutputValue, addOutputValue, addOutputValue, addOutputValue, addOutputValue, addOutputValue, addOutputValue, addOutputValues, answer, answer, call, child, childTriggered, clearBuffer, clearNamedOutputBean, clearOutput, clearOutputBean, clearOutputBean, cloneContinuations, containsHeader, defer, duringStepBack, enableTextBuffer, encodeHtml, encodeXml, evaluateExpressionRoleUserTags, exit, fillSubmissionBean, fillSubmissionBean, fillSubmissionBean, fillSubmissionBean, flush, forward, generateEmptyForm, generateEmptyForm, generateForm, generateForm, getContentType, getContinuationId, getCookie, getCookieValue, getCookieValue, getCookieValueBoolean, getCookieValueBoolean, getCookieValueDouble, getCookieValueDouble, getCookieValueFloat, getCookieValueFloat, getCookieValueInt, getCookieValueInt, getCookieValueLong, getCookieValueLong, getCookieValues, getDateHeader, getDeclarationName, getDeployer, getDeploymentClass, getElementContext, getElementInfo, getEmbedData, getEmbedDifferentiator, getEmbeddingElement, getEmbeddingTemplate, getEmbedProperties, getEmbedValue, getExitFormParameters, getExitFormParameters, getExitFormParametersJavascript, getExitFormUrl, getExitFormUrl, getExitQueryUrl, getExitQueryUrl, getExitQueryUrl, getExitQueryUrl, getHeader, getHeaderNames, getHeaders, getHtmlTemplate, getHtmlTemplate, getHtmlTemplate, getHtmlTemplate, getHtmlTemplate, getHttpServletRequest, getHttpServletResponse, getInitConfig, getInput, getInput, getInputBean, getInputBean, getInputBoolean, getInputBoolean, getInputDate, getInputDate, getInputDouble, getInputDouble, getInputFloat, getInputFloat, getInputInt, getInputInt, getInputLong, getInputLong, getInputSerializable, getInputSerializable, getInputValues, getIntHeader, getMethod, getNamedInputBean, getNamedSubmissionBean, getNamedSubmissionBean, getOutput, getOutputStream, getParameter, getParameter, getParameterBoolean, getParameterBoolean, getParameterDouble, getParameterDouble, getParameterDoubleValues, getParameterFloat, getParameterFloat, getParameterFloatValues, getParameterInt, getParameterInt, getParameterIntValues, getParameterLong, getParameterLong, getParameterLongValues, getParameterNames, getParameterNames, getParameterValues, getPathInfo, getProperty, getProperty, getPropertyString, getPropertyString, getPropertyTyped, getPropertyTyped, getProtocol, getRemoteAddr, getRemoteHost, getRemoteUser, getRequestAttribute, getRequestAttributeNames, getRequestCharacterEncoding, getRequestLocale, getRequestLocales, getResponseCharacterEncoding, getResponseLocale, getScheme, getServerName, getServerPort, getServerRootUrl, getServletContext, getSite, getSourceName, getSubmission, getSubmissionBean, getSubmissionBean, getSubmissionBean, getSubmissionBean, getSubmissionFormParameters, getSubmissionFormParameters, getSubmissionFormParametersJavascript, getSubmissionFormUrl, getSubmissionFormUrl, getSubmissionQueryUrl, getSubmissionQueryUrl, getSubmissionQueryUrl, getSubmissionQueryUrl, getTarget, getTxtTemplate, getTxtTemplate, getTxtTemplate, getTxtTemplate, getTxtTemplate, getUploadedFile, getUploadedFileNames, getUploadedFileNames, getUploadedFiles, getWebappRootUrl, getXhtmlTemplate, getXhtmlTemplate, getXhtmlTemplate, getXhtmlTemplate, getXhtmlTemplate, getXmlTemplate, getXmlTemplate, getXmlTemplate, getXmlTemplate, getXmlTemplate, hasCookie, hasEmbedData, hasEmbedValue, hasInputValue, hasParameterValue, hasProperty, hasRequestAttribute, hasSubmission, hasSubmission, hasUploadedFile, initialize, isEmbedded, isFileEmpty, isInputEmpty, isParameterEmpty, isPropertyEmpty, isSecure, isTextBufferEnabled, pause, preventCaching, print, print, processEmbeddedElement, processEmbeddedElement, processEmbeddedElement, processEmbeddedElement, processTemplate, prohibitRawAccess, redirect, removeForm, removeForm, removeRequestAttribute, selectInputParameter, selectParameter, selectSubmissionParameter, selectSubmissionParameter, sendError, sendError, sendRedirect, setChildTrigger, setCloneContinuations, setContentLength, setContentType, setCookie, setDateHeader, setDeploymentClass, setElementContext, setExitForm, setExitForm, setExitForm, setExitForm, setExitQuery, setExitQuery, setExitQuery, setExitQuery, setHeader, setInitializer, setIntHeader, setNamedOutputBean, setOutput, setOutput, setOutput, setOutput, setOutput, setOutput, setOutput, setOutput, setOutput, setOutput, setOutputBean, setOutputBean, setProhibitRawAccess, setRequestAttribute, setResponseLocale, setStatus, setSubmissionBean, setSubmissionBean, setSubmissionForm, setSubmissionForm, setSubmissionForm, setSubmissionForm, setSubmissionQuery, setSubmissionQuery, setSubmissionQuery, setSubmissionQuery, stepBack
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Element

protected Element()
No-op default constructor that can only be used by extending classes.

Since:
1.0
Method Detail

noticeElement

public final void noticeElement(ElementSupport element)
Description copied from interface: ElementAware
This method is called immediately after the instantiation of the element to provide the support object that allows the element to function in the current context. Note that the context is not setup yet, the bridge object is merely provided at this stage.

It's good practice to store the elementSupport parameter in a member variable of the element, making it possible to use it from any method in the element.

This method should also be used to provide the elementSupport instance with an ElementDeployer, an ElementInitializer and an ElementChildTrigger, if they are needed.

Specified by:
noticeElement in interface ElementAware
Parameters:
element - the ElementSupport instance for this request and this element
See Also:
ElementSupport

processElement

public void processElement()
                    throws EngineException
Description copied from interface: ElementAware
The default entry point that will be called when a request arrives.

Specified by:
processElement in interface ElementAware
Throws:
EngineException

clone

public Object clone()
             throws CloneNotSupportedException
Provides default cloning behavior by trying to make deep clones of all member variables, correctly handling primitives and collections.

Cloning is important when this element uses continuations since at each continuation step a clone will be made of the element instance to be able to still execute older continuations.

Specified by:
clone in interface ContinuableObject
Overrides:
clone in class ElementSupport
Returns:
a clone of this element instance
Throws:
CloneNotSupportedException
Since:
1.0
See Also:
ContinuationConfigRuntime.cloneContinuations(T)


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.