001package 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 024import org.apache.commons.configuration2.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$ 038 */ 039public interface ServiceManager extends ServiceBroker 040{ 041 /** 042 * Initialize this service manager. 043 * @throws InitializationException if the service manager could not be initialized 044 */ 045 void init() throws InitializationException; 046 047 /** 048 * Get the configuration for this service manager. 049 * 050 * @return Manager configuration. 051 */ 052 Configuration getConfiguration(); 053 054 /** 055 * Set the configuration object for the services broker. 056 * This is the configuration that contains information 057 * about all services in the care of this service 058 * manager. 059 * 060 * @param configuration Manager configuration. 061 */ 062 void setConfiguration(Configuration configuration); 063 064 /** 065 * Set the application root. 066 * 067 * @param applicationRoot application root 068 */ 069 void setApplicationRoot(String applicationRoot); 070}