org.apache.tapestry.engine
Class AbstractService
java.lang.Object
|
+--org.apache.tapestry.engine.AbstractService
- All Implemented Interfaces:
- IEngineService
- Direct Known Subclasses:
- ActionService, AssetService, DirectService, ExternalService, HomeService, PageService, ResetService, RestartService
- public abstract class AbstractService
- extends Object
- implements IEngineService
Abstract base class for implementing engine services. Instances of services
are shared by many engines and threads, so they must be threadsafe.
Note; too much of the URL encoding/decoding stategy is fixed here.
A future release of Tapestry may extract this strategy, allowing developers
to choose the method via which URLs are encoded.
- Since:
- 1.0.3
- Version:
- $Id: AbstractService.java,v 1.2 2003/03/18 20:55:32 hlship Exp $
- Author:
- Howard Lewis Ship
- See Also:
AbstractEngine.getService(String)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractService
public AbstractService()
constructLink
protected ILink constructLink(IRequestCycle cycle,
String serviceName,
String[] serviceContext,
Object[] parameters,
boolean stateful)
- Constructs a link for the service.
- Parameters:
cycle
- the request cycleserviceName
- the name of the serviceserviceContext
- context related to the service itself which is added to the URL as-isparameters
- additional service parameters provided by the component;
this is application specific information, and is encoded with
URLEncoder#encode(String)
before being added
to the query.stateful
- if true, the final URL must be encoded with the HttpSession id
getServiceContext
protected String[] getServiceContext(RequestContext context)
- Returns the service context as an array of Strings.
Returns null if there are no service context strings.
getParameters
protected Object[] getParameters(IRequestCycle cycle)
- Returns the service parameters as an array of Strings.