shocks.framework.workflow.sequence.repository
Class Sequence
java.lang.Object
shocks.framework.workflow.sequence.repository.Sequence
- All Implemented Interfaces:
- java.lang.Cloneable, Workflow
- public class Sequence
- extends java.lang.Object
- implements Workflow, java.lang.Cloneable
This is synonymous with Aspect-Oriented Programming, or
AOP. In AOP, the system can introduce "pointcutting", which means that it
can introduce a crosscutting concern into a specific point in the
application workflow dynamically at runtime.
Shocks does this in much the same way that other AOP frameworks do it,
only Shocks doesn't expend resources at runtime to build sequences. The
workflow sequences are generated at the time the servlets are loaded into
the container, and the system is designed so that new workflow sequences
can be generated at runtime. This allows us to cache the
sequences into an instance pooling mechanism and reuse the components.
It is possible to mutate the workflow sequences in the middle of an
operation, thus cancelling out the inversion of control. We don't recommend
this, but it can be done.
Field Summary |
java.lang.String |
NAME
|
java.lang.String |
VERSION
|
Method Summary |
java.lang.Object |
clone()
|
DataSource |
forward(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext ctx)
Forwards a request on to another workflow component. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public final java.lang.String NAME
VERSION
public final java.lang.String VERSION
Sequence
public Sequence(DataSource metadata,
Workflow next)
forward
public DataSource forward(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext ctx)
- Description copied from interface:
Workflow
- Forwards a request on to another workflow component. The primary
responsibility of this method is to ensure that the flow of control over
the application continues. The container may provide additional
contextual information (such as in the form of metadata) to assist
workflow components in the determination of their operation, but that is
not required by this interface.
- Specified by:
forward
in interface Workflow
- Parameters:
request
- the HttpServletRequest Object for the current transactionresponse
- the HttpServletResponse Object for the current transactionctx
- the ServletContext for the web application
- Returns:
- DataSource, usually a result object containing information about
the success of the workflow sequence.
clone
public java.lang.Object clone()