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.Collections;
017import java.util.List;
018
019import org.apache.tapestry5.ioc.annotations.UsesOrderedConfiguration;
020
021/**
022 * Service that collects the {@link ServiceConfigurationListener}s. Don't use this service directly.
023 */
024@UsesOrderedConfiguration(ServiceConfigurationListener.class)
025final public class ServiceConfigurationListenerHub
026{
027    
028    final private List<ServiceConfigurationListener> listeners;
029    
030    public ServiceConfigurationListenerHub(List<ServiceConfigurationListener> listeners)
031    {
032        super();
033        this.listeners = Collections.unmodifiableList(listeners);
034    }
035
036    /**
037     * Returns the list of service configuration listeners. 
038     */
039    public List<ServiceConfigurationListener> getListeners()
040    {
041        return listeners;
042    }
043    
044}