Clover coverage report - Code Coverage for tapestry release 3.1-alpha-1
Coverage timestamp: Mon Feb 21 2005 09:16:14 EST
file stats: LOC: 78   Methods: 0
NCLOC: 11   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover 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 javax.servlet.ServletException;
 20   
 
 21   
 import org.apache.tapestry.IRequestCycle;
 22   
 import org.apache.tapestry.request.ResponseOutputStream;
 23   
 
 24   
 /**
 25   
  * A service, provided by the {@link org.apache.tapestry.IEngine}, for its pages and/or components.
 26   
  * Services are responsible for constructing {@link EngineServiceLink}s (an encoding of URLs) to
 27   
  * represent dynamic application behavior, and for parsing those URLs when a subsequent request
 28   
  * involves them.
 29   
  * 
 30   
  * @see org.apache.tapestry.IEngine#getService(String)
 31   
  * @author Howard Lewis Ship
 32   
  */
 33   
 
 34   
 public interface IEngineService
 35   
 {
 36   
     /**
 37   
      * Builds a URL for a service. This is performed during the rendering phase of one request cycle
 38   
      * and bulds URLs that will invoke activity in a subsequent request cycle.
 39   
      * <p>
 40   
      * <b>This method changed incompatibly between release 3.0 and release 3.1. </b>
 41   
      * </p>
 42   
      * 
 43   
      * @param cycle
 44   
      *            Defines the request cycle being processed.
 45   
      * @param parameter
 46   
      *            An object that provide any additional information needed by the service. Each
 47   
      *            service implementation will expect that an object of the proper type be passed in.
 48   
      *            In some cases, a simple String will do; in others, a specific object (possibly
 49   
      *            implementing an interface) will be required.
 50   
      * @return The URL for the service. The URL will have to be encoded via
 51   
      *         {@link javax.servlet.http.HttpServletResponse#encodeURL(java.lang.String)}.
 52   
      */
 53   
 
 54   
     public ILink getLink(IRequestCycle cycle, Object parameter);
 55   
 
 56   
     /**
 57   
      * Perform the service, interpreting the URL (from the
 58   
      * {@link javax.servlet.http.HttpServletRequest}) responding appropriately, and rendering a
 59   
      * result page.
 60   
      * 
 61   
      * @param cycle
 62   
      *            the incoming request
 63   
      * @param output
 64   
      *            stream to which output should ultimately be directed
 65   
      * @see org.apache.tapestry.IEngine#service(org.apache.tapestry.request.RequestContext)
 66   
      */
 67   
 
 68   
     public void service(IRequestCycle cycle, ResponseOutputStream output) throws ServletException,
 69   
             IOException;
 70   
 
 71   
     /**
 72   
      * Returns the name of the service.
 73   
      * 
 74   
      * @since 1.0.1
 75   
      */
 76   
 
 77   
     public String getName();
 78   
 }