001    // Copyright 2006, 2007, 2008 The Apache Software Foundation
002    //
003    // Licensed under the Apache License, Version 2.0 (the "License");
004    // you may not use this file except in compliance with the License.
005    // You may obtain a copy of the License at
006    //
007    // http://www.apache.org/licenses/LICENSE-2.0
008    //
009    // Unless required by applicable law or agreed to in writing, software
010    // distributed under the License is distributed on an "AS IS" BASIS,
011    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012    // See the License for the specific language governing permissions and
013    // limitations under the License.
014    
015    package org.apache.tapestry5.ioc;
016    
017    import org.slf4j.Logger;
018    
019    /**
020     * Contains resources that may be provided to a service when it initializes, which includes other services defined in
021     * the registry. ServiceResources provides access to other services (it extends
022     * {@link org.apache.tapestry5.ioc.ObjectLocator}).
023     */
024    public interface ServiceResources extends ObjectLocator, AnnotationAccess
025    {
026        /**
027         * Returns the fully qualified id of the service.
028         */
029        String getServiceId();
030    
031        /**
032         * Returns the service interface implemented by the service.
033         */
034        Class getServiceInterface();
035    
036        /**
037         * Returns a Logger appropriate for logging messages. This includes debug level messages about the creation and
038         * configuration of the underlying service, as well as debug, warning, or error level messages from the service
039         * itself. Often service interceptors will make use of the service's logger.
040         */
041        Logger getLogger();
042    
043        /**
044         * Returns an object that can be used to track operations related to constructing, configuring, decorating and
045         * initializing the service.
046         */
047        OperationTracker getTracker();
048    
049        /**
050         * Returns null (as of 5.3).
051         * 
052         * @since 5.2.0
053         * @deprecated Deprecated in 5.3 with no replacement. May be removed in 5.4.
054         */
055        Class getImplementationClass();
056    }