001 package org.apache.turbine.services;
002
003
004 /*
005 * Licensed to the Apache Software Foundation (ASF) under one
006 * or more contributor license agreements. See the NOTICE file
007 * distributed with this work for additional information
008 * regarding copyright ownership. The ASF licenses this file
009 * to you under the Apache License, Version 2.0 (the
010 * "License"); you may not use this file except in compliance
011 * with the License. You may obtain a copy of the License at
012 *
013 * http://www.apache.org/licenses/LICENSE-2.0
014 *
015 * Unless required by applicable law or agreed to in writing,
016 * software distributed under the License is distributed on an
017 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
018 * KIND, either express or implied. See the License for the
019 * specific language governing permissions and limitations
020 * under the License.
021 */
022
023
024 import org.apache.commons.configuration.Configuration;
025
026 /**
027 * Classes that implement this interface can act as a manager for
028 * <code>Service</code> classes.
029 *
030 * Functionality that <code>ServiceManager</code> provides in addition
031 * to <code>ServiceBroker</code> functionality includes configuration
032 * of the manager.
033 *
034 * @author <a href="mailto:ilkka.priha@simsoft.fi">Ilkka Priha</a>
035 * @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
036 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
037 * @version $Id: ServiceManager.java 615328 2008-01-25 20:25:05Z tv $
038 */
039 public interface ServiceManager extends ServiceBroker
040 {
041 /**
042 * Initialize this service manager.
043 */
044 void init() throws InitializationException;
045
046 /**
047 * Get the configuration for this service manager.
048 *
049 * @return Manager configuration.
050 */
051 Configuration getConfiguration();
052
053 /**
054 * Set the configuration object for the services broker.
055 * This is the configuration that contains information
056 * about all services in the care of this service
057 * manager.
058 *
059 * @param configuration Manager configuration.
060 */
061 void setConfiguration(Configuration configuration);
062
063 /**
064 * Set the application root.
065 *
066 * @param applicationRoot application root
067 */
068 void setApplicationRoot(String applicationRoot);
069 }