Clover coverage report - Code Coverage for hivemind release 1.0-beta-2
Coverage timestamp: Sun Aug 1 2004 14:03:45 EDT
file stats: LOC: 87   Methods: 0
NCLOC: 12   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
ConstructableServicePoint.java - - - -
coverage
 1   
 //  Copyright 2004 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.hivemind.impl;
 16   
 
 17   
 import java.util.List;
 18   
 
 19   
 import org.apache.hivemind.*;
 20   
 import org.apache.hivemind.internal.ServicePoint;
 21   
 import org.apache.hivemind.internal.ServiceImplementationConstructor;
 22   
 
 23   
 /**
 24   
  * "Private" interface used by a {@link org.apache.hivemind.ServiceModel}
 25   
  * to access non-public information about a 
 26   
  * {@link ConstructableServicePoint}, such as
 27   
  * its instance builder and interceptors.
 28   
  *
 29   
  * @author Howard Lewis Ship
 30   
  */
 31   
 public interface ConstructableServicePoint extends ServicePoint
 32   
 {
 33   
     /**
 34   
      * Returns the constructor that can create the core service implementation.
 35   
      */
 36   
     public ServiceImplementationConstructor getServiceConstructor();
 37   
 
 38   
     /**
 39   
      * Returns a list of {@link org.apache.hivemind.ServiceInterceptorContribution}s, 
 40   
      * ordered according to their dependencies.  May return null or an empty list.
 41   
      * 
 42   
      * <p>
 43   
      * Note that the order is tricky! To keep any error messages while ordering
 44   
      * the interceptors understandable, they are ordered according into runtime
 45   
      * execution order.  Example: If we want a logging interceptor
 46   
      * to operate before a security-check interceptor, we'll write the following
 47   
      * in the descriptor:
 48   
      * 
 49   
      * <pre>
 50   
      *   &lt;interceptor service-id="hivemind.LoggingInterceptor" before="*"/&gt;
 51   
      *   &lt;interceptor service-id="somepackage.SecurityInterceptor"/&gt;
 52   
      * </pre>
 53   
      * 
 54   
      * The <code>before</code> value for the first interceptor contribution
 55   
      * will be assigned to the contribution's
 56   
      * {@link org.apache.hivemind.ServiceInterceptorContribution#getFollowingInterceptorIds() followingInterceptorIds}
 57   
      * property, because all other interceptors (including the security interceptor)
 58   
      * should have their behavior follow the logging interceptor.
 59   
      * 
 60   
      * <p>
 61   
      * To get this behavior, the logging interceptor will delegate to the security
 62   
      * interceptor, and the security interceptor will delegate to
 63   
      * the core service implementation.
 64   
      * 
 65   
      * <p>
 66   
      * The trick is that interceptors are applied in reverse order: we start
 67   
      * with core service implementation, wrap it with the security interceptor, then
 68   
      * wrap that with the logging interceptor ... but that's an issue that applies
 69   
      * when building the interceptor stack around the core service implementation.
 70   
      */
 71   
     public List getOrderedInterceptorContributions();
 72   
 
 73   
     /**
 74   
      * Invoked by the ServiceModel when constuction information
 75   
      * (the builder and interceptors) is no longer needed.
 76   
      */
 77   
     public void clearConstructorInformation();
 78   
     
 79   
     /**
 80   
      * Returns the {@link ShutdownCooordinator}, used by
 81   
      * the service model to inform proxies that the service
 82   
      * has shutdown.
 83   
      */
 84   
     
 85   
     public ShutdownCoordinator getShutdownCoordinator();
 86   
 }
 87