Clover coverage report - Code Coverage for tapestry release 4.0-beta-2
Coverage timestamp: Sat Jul 9 2005 22:02:17 EDT
file stats: LOC: 72   Methods: 0
NCLOC: 8   Classes: 1
30 day Evaluation License registered to hlship@comcast.net Your 30 day evaluation period has expired. Please visit http://www.cenqua.com to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
IEngineService.java - - - -
coverage
 1    // Copyright 2004, 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.tapestry.engine;
 16   
 17    import java.io.IOException;
 18   
 19    import org.apache.tapestry.IRequestCycle;
 20   
 21    /**
 22    * A service, provided by the {@link org.apache.tapestry.IEngine}, for its pages and/or components.
 23    * Services are responsible for constructing {@link EngineServiceLink}s (an encoding of URLs) to
 24    * represent dynamic application behavior, and for parsing those URLs when a subsequent request
 25    * involves them.
 26    *
 27    * @see org.apache.tapestry.IEngine#getService(String)
 28    * @author Howard Lewis Ship
 29    */
 30   
 31    public interface IEngineService
 32    {
 33    /**
 34    * Builds a URL for a service. This is performed during the rendering phase of one request cycle
 35    * and bulds URLs that will invoke activity in a subsequent request cycle.
 36    * <p>
 37    * <b>This method changed incompatibly between release 3.0 and release 4.0. </b>
 38    * </p>
 39    *
 40    * @param cycle
 41    * Defines the request cycle being processed.
 42    * @param parameter
 43    * An object that provide any additional information needed by the service. Each
 44    * service implementation will expect that an object of the proper type be passed in.
 45    * In some cases, a simple String will do; in others, a specific object (possibly
 46    * implementing an interface) will be required.
 47    * @return The URL for the service. The URL will have to be encoded via
 48    * {@link javax.servlet.http.HttpServletResponse#encodeURL(java.lang.String)}.
 49    */
 50   
 51    public ILink getLink(IRequestCycle cycle, Object parameter);
 52   
 53    /**
 54    * Perform the service, interpreting the URL (from the
 55    * {@link javax.servlet.http.HttpServletRequest}) responding appropriately, and rendering a
 56    * result page.
 57    * @param cycle
 58    * the incoming request
 59    *
 60    * @see org.apache.tapestry.IEngine#service(org.apache.tapestry.request.RequestContext)
 61    */
 62   
 63    public void service(IRequestCycle cycle) throws IOException;
 64   
 65    /**
 66    * Returns the name of the service.
 67    *
 68    * @since 1.0.1
 69    */
 70   
 71    public String getName();
 72    }