View Javadoc

1   package org.apache.turbine.services;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.commons.configuration.Configuration;
23  
24  /***
25   * Classes that implement this interface can act as a manager for
26   * <code>Service</code> classes.
27   *
28   * Functionality that <code>ServiceManager</code> provides in addition
29   * to <code>ServiceBroker</code> functionality includes configuration
30   * of the manager.
31   *
32   * @author <a href="mailto:ilkka.priha@simsoft.fi">Ilkka Priha</a>
33   * @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
34   * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
35   * @version $Id: ServiceManager.java 534527 2007-05-02 16:10:59Z tv $
36   */
37  public interface ServiceManager extends ServiceBroker
38  {
39      /***
40       * Initialize this service manager.
41       */
42      void init() throws InitializationException;
43  
44      /***
45       * Get the configuration for this service manager.
46       *
47       * @return Manager configuration.
48       */
49      Configuration getConfiguration();
50  
51      /***
52       * Set the configuration object for the services broker.
53       * This is the configuration that contains information
54       * about all services in the care of this service
55       * manager.
56       *
57       * @param configuration Manager configuration.
58       */
59      void setConfiguration(Configuration configuration);
60  
61      /***
62       * Set the application root.
63       *
64       * @param applicationRoot application root
65       */
66      void setApplicationRoot(String applicationRoot);
67  }