    001// Copyright 2014 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.
    014package org.apache.tapestry5.ioc.services;
    015
    016import java.util.Collection;
    017import java.util.List;
    018import java.util.Map;
    019
    020import org.apache.tapestry5.ioc.def.ServiceDef;
    021
    022/**
    023 * Interface that defines listeners to services getting their distributed configuration.
    024 */
    025@SuppressWarnings("rawtypes")
    026public interface ServiceConfigurationListener
    027{
    028
    029    /**
    030     * Receives a notification of an ordered configuraton being passed to a service.
    031     * @param serviceDef a {@link ServiceDef} identifying the service receiving the configuration.
    032     * @param configuration a {@link List} containing the configuration itself.
    033     */
    034    void onOrderedConfiguration(ServiceDef serviceDef, List configuration);
    035
    036    /**
    037     * Receives a notification of an unordered configuraton being passed to a service.
    038     * @param serviceDef a {@link ServiceDef} identifying the service receiving the configuration.
    039     * @param configuration a {@link Collection} containing the configuration itself.
    040     */
    041    void onUnorderedConfiguration(ServiceDef serviceDef, Collection configuration);
    042
    043    /**
    044     * Receives a notification of a mapped configuraton being passed to a service.
    045     * @param serviceDef a {@link ServiceDef} identifying the service receiving the configuration.
    046     * @param configuration a {@link Map} containing the configuration itself.
    047     */
    048    void onMappedConfiguration(ServiceDef serviceDef, Map configuration);
    049
    050}