org.apache.tapestry.engine
Class ResetService

java.lang.Object
  extended by org.apache.tapestry.engine.AbstractService
      extended by org.apache.tapestry.engine.ResetService
All Implemented Interfaces:
IEngineService

public class ResetService
extends AbstractService

ServiceLink used to discard all cached data (templates, specifications, et cetera). This is primarily used during development. It could be a weakness of a Tapestry application, making it susceptible to denial of service attacks, which is why it is disabled by default. The link generated by the ResetService redisplays the current page after discarding all data.

Since:
1.0.9
Version:
$Id: ResetService.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship
See Also:
IEngine.isResetServiceEnabled()

Constructor Summary
ResetService()
           
 
Method Summary
 ILink getLink(IRequestCycle cycle, IComponent component, Object[] parameters)
          Builds a URL for a service.
 String getName()
          Returns the name of the service.
 void service(IEngineServiceView engine, IRequestCycle cycle, ResponseOutputStream output)
          Perform the service, interpreting the URL (from the HttpServletRequest) responding appropriately, and rendering a result page.
 
Methods inherited from class org.apache.tapestry.engine.AbstractService
constructLink, getParameters, getServiceContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResetService

public ResetService()
Method Detail

getLink

public ILink getLink(IRequestCycle cycle,
                     IComponent component,
                     Object[] parameters)
Description copied from interface: IEngineService
Builds a URL for a service. This is performed during the rendering phase of one request cycle and bulds URLs that will invoke activity in a subsequent request cycle.

Parameters:
cycle - Defines the request cycle being processed.
component - The component requesting the URL. Generally, the service context is established from the component.
parameters - Additional parameters specific to the component requesting the EngineServiceLink.
Returns:
The URL for the service. The URL will have to be encoded via HttpServletResponse.encodeURL(java.lang.String).

getName

public String getName()
Description copied from interface: IEngineService
Returns the name of the service.


service

public void service(IEngineServiceView engine,
                    IRequestCycle cycle,
                    ResponseOutputStream output)
             throws ServletException,
                    IOException
Description copied from interface: IEngineService
Perform the service, interpreting the URL (from the HttpServletRequest) responding appropriately, and rendering a result page.

Parameters:
engine - a view of the IEngine with additional methods needed by services
cycle - the incoming request
output - stream to which output should ultimately be directed
Throws:
ServletException
IOException
See Also:
IEngine.service(org.apache.tapestry.request.RequestContext)