org.apache.tapestry.engine
Interface IEngineService

All Known Implementing Classes:
AbstractService, TagSupportService

public interface IEngineService

A service, provided by the IEngine, for its pages and/or components. Services are responsible for constructing EngineServiceLinks (an encoding of URLs) to represent dynamic application behavior, and for parsing those URLs when a subsequent request involves them.

Version:
$Id: IEngineService.java,v 1.7 2004/01/19 21:32:13 hlship Exp $
Author:
Howard Lewis Ship
See Also:
IEngine.getService(String)

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.
 

Method Detail

getLink

public ILink getLink(IRequestCycle cycle,
                     IComponent component,
                     Object[] parameters)
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).

service

public void service(IEngineServiceView engine,
                    IRequestCycle cycle,
                    ResponseOutputStream output)
             throws ServletException,
                    IOException
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
ServletException
IOException
See Also:
IEngine.service(org.apache.tapestry.request.RequestContext)

getName

public String getName()
Returns the name of the service.

Since:
1.0.1