View Javadoc

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