org.apache.tapestry.engine
Interface IEngineService

All Known Implementing Classes:
ActionService, AssetService, DirectService, EngineServiceInnerProxy, EngineServiceOuterProxy, ExternalService, HomeService, PageService, ResetService, RestartService

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.

Author:
Howard Lewis Ship
See Also:
IEngine.getService(String)

Method Summary
 ILink getLink(IRequestCycle cycle, java.lang.Object parameter)
          Builds a URL for a service.
 java.lang.String getName()
          Returns the name of the service.
 void service(IRequestCycle cycle)
          Perform the service, interpreting the URL (from the HttpServletRequest) responding appropriately, and rendering a result page.
 

Method Detail

getLink

public ILink getLink(IRequestCycle cycle,
                     java.lang.Object parameter)
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.

This method changed incompatibly between release 3.0 and release 4.0.

Parameters:
cycle - Defines the request cycle being processed.
parameter - An object that provide any additional information needed by the service. Each service implementation will expect that an object of the proper type be passed in. In some cases, a simple String will do; in others, a specific object (possibly implementing an interface) will be required.
Returns:
The URL for the service. The URL will have to be encoded via HttpServletResponse.encodeURL(java.lang.String).

service

public void service(IRequestCycle cycle)
             throws java.io.IOException
Perform the service, interpreting the URL (from the HttpServletRequest) responding appropriately, and rendering a result page.

Parameters:
cycle - the incoming request
Throws:
java.io.IOException
See Also:
org.apache.tapestry.IEngine#service(org.apache.tapestry.request.RequestContext)

getName

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

Since:
1.0.1