Clover coverage report - Code Coverage for hivemind release 1.1-beta-2
Coverage timestamp: Tue Jun 28 2005 10:28:23 EDT
file stats: LOC: 45   Methods: 0
NCLOC: 5   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ServiceModel.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.hivemind.internal;
 16   
 17    /**
 18    * A service model is associated with a {@link org.apache.hivemind.internal.ServicePoint} to supply
 19    * rules for the lifecycle of the service. This concerns when the service is first created and
 20    * whether it is pooled, etc. Each service extension point will have a unique instance of
 21    * ServiceModel.
 22    *
 23    * @author Howard Lewis Ship
 24    */
 25    public interface ServiceModel
 26    {
 27    /**
 28    * Invoked by the service extension point to obtain the service implementation. The model may
 29    * return the actual service implementation or some form of proxy.
 30    * <p>
 31    * This method is only invoked <em>once</em>; the returned value is used from that point on
 32    * (in all threads, by all callers). Most models return a proxy that takes care of realizing the
 33    * service (actually creating the service, configuring it, and wrapping it with interceptors)
 34    * only when needed.
 35    */
 36   
 37    public Object getService();
 38   
 39    /**
 40    * Forces the core service implementation (and any interceptors) to be fully instantiated
 41    * immediately, rather than waiting for the first service method invocation. This is used when a
 42    * service needs to be "eagerly loaded" rather than "lazy loaded".
 43    */
 44    public void instantiateService();
 45    }