wicket.request.compound
Class AbstractCompoundRequestCycleProcessor

java.lang.Object
  extended by wicket.request.compound.AbstractCompoundRequestCycleProcessor
All Implemented Interfaces:
IRequestCycleProcessor
Direct Known Subclasses:
CompoundRequestCycleProcessor

public abstract class AbstractCompoundRequestCycleProcessor
extends java.lang.Object
implements IRequestCycleProcessor

A request cycle processor implementatation that delegates to pluggable strategies. This processor is abstract so that it can easily be used as a factory if wanted.

Author:
Eelco Hillenius

Constructor Summary
AbstractCompoundRequestCycleProcessor()
          Construct.
 
Method Summary
protected abstract  IEventProcessorStrategy getEventProcessorStrategy()
          Gets the strategy for the event process method.
protected abstract  IExceptionResponseStrategy getExceptionResponseStrategy()
          Gets the strategy for the exception response method.
protected abstract  IRequestTargetResolverStrategy getRequestTargetResolverStrategy()
          Gets the strategy for the resolve method.
protected abstract  IResponseStrategy getResponseStrategy()
          Gets the strategy for the response method.
 void processEvents(RequestCycle requestCycle)
          After a page is restored, this method is responsible for calling any event handling code based on the request.
 IRequestTarget resolve(RequestCycle requestCycle, RequestParameters requestParameters)
           Resolves the request and returns the request target.
 void respond(RequestCycle requestCycle)
          After the target is resolved and the request events are handled, it is time to respond to the request.
 void respond(java.lang.RuntimeException e, RequestCycle requestCycle)
          Whenever a unhandled exception is encountered during the processing of a request cycle, this method is called to respond to the request in a proper way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wicket.request.IRequestCycleProcessor
getRequestCodingStrategy
 

Constructor Detail

AbstractCompoundRequestCycleProcessor

public AbstractCompoundRequestCycleProcessor()
Construct.

Method Detail

resolve

public IRequestTarget resolve(RequestCycle requestCycle,
                              RequestParameters requestParameters)
Description copied from interface: IRequestCycleProcessor

Resolves the request and returns the request target. Typically, the resolver uses the RequestParameters object that is passed in.

Implementors of this method should be careful not to mix this code with event handling code; method IRequestCycleProcessor.processEvents(RequestCycle) is meant for that purpose.

Specified by:
resolve in interface IRequestCycleProcessor
Parameters:
requestCycle - the current request cycle
requestParameters - The request parameters object as decoded by this processor's IRequestCodingStrategy.
Returns:
the request target; has to be non-null!
See Also:
IRequestCycleProcessor.resolve(wicket.RequestCycle, RequestParameters)

processEvents

public void processEvents(RequestCycle requestCycle)
Description copied from interface: IRequestCycleProcessor
After a page is restored, this method is responsible for calling any event handling code based on the request. For example, when a link is clicked, IRequestCycleProcessor.resolve(RequestCycle, RequestParameters) should return the page that that link resides on, and this method should call the ILinkListener interface on that component.

Specified by:
processEvents in interface IRequestCycleProcessor
Parameters:
requestCycle - the current request cycle
See Also:
IRequestCycleProcessor.processEvents(wicket.RequestCycle)

respond

public void respond(RequestCycle requestCycle)
Description copied from interface: IRequestCycleProcessor
After the target is resolved and the request events are handled, it is time to respond to the request. This method is responsible for executing the proper response sequence given the current request target and response.

Specified by:
respond in interface IRequestCycleProcessor
Parameters:
requestCycle - the current request cycle
See Also:
IRequestCycleProcessor.respond(wicket.RequestCycle)

respond

public void respond(java.lang.RuntimeException e,
                    RequestCycle requestCycle)
Description copied from interface: IRequestCycleProcessor
Whenever a unhandled exception is encountered during the processing of a request cycle, this method is called to respond to the request in a proper way.

Specified by:
respond in interface IRequestCycleProcessor
Parameters:
e - any unhandled exception
requestCycle - the current request cycle
See Also:
IRequestCycleProcessor.respond(java.lang.RuntimeException, wicket.RequestCycle)

getRequestTargetResolverStrategy

protected abstract IRequestTargetResolverStrategy getRequestTargetResolverStrategy()
Gets the strategy for the resolve method.

Returns:
the strategy for the resolve method

getEventProcessorStrategy

protected abstract IEventProcessorStrategy getEventProcessorStrategy()
Gets the strategy for the event process method.

Returns:
the strategy for the event process method

getResponseStrategy

protected abstract IResponseStrategy getResponseStrategy()
Gets the strategy for the response method.

Returns:
the strategy for the response method

getExceptionResponseStrategy

protected abstract IExceptionResponseStrategy getExceptionResponseStrategy()
Gets the strategy for the exception response method.

Returns:
the strategy for the exception response method


Copyright © 2004-2007 Wicket developers. All Rights Reserved.