blob: c1ae98dbd65aef16d8abfbbd738f22b6ef952361 [file] [log] [blame]
alshabib77b88482015-04-07 15:47:50 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
alshabib77b88482015-04-07 15:47:50 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Andrea Campanella238d96e2016-01-20 11:52:02 -080016package org.onosproject.net.driver;
alshabib77b88482015-04-07 15:47:50 -070017
Ray Milkeyd84f89b2018-08-17 14:54:17 -070018import org.osgi.service.component.annotations.Reference;
19import org.osgi.service.component.annotations.ReferenceCardinality;
alshabib77b88482015-04-07 15:47:50 -070020
alshabib77b88482015-04-07 15:47:50 -070021/**
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070022 * Abstract bootstrapper for loading and registering driver definitions that
23 * are dependent on the default driver definitions.
alshabib77b88482015-04-07 15:47:50 -070024 */
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070025public abstract class AbstractDriverLoader extends AbstractIndependentDriverLoader {
alshabib77b88482015-04-07 15:47:50 -070026
Thomas Vachuska11b99fc2017-04-27 12:51:04 -070027 // FIXME: This requirement should be removed and the driver extensions that
28 // depend on the default drivers being loaded should be modified to instead
29 // express the dependency using the application dependency mechanism.
Ray Milkeyd84f89b2018-08-17 14:54:17 -070030 @Reference(cardinality = ReferenceCardinality.MANDATORY)
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070031 protected DefaultDriverProviderService defaultDriverProviderService;
Thomas Vachuska866b46a2015-04-30 00:26:55 -070032
Thomas Vachuska800a7a42016-02-16 16:11:13 -080033 /**
34 * Creates a new loader for resource with the specified path.
35 *
36 * @param path drivers definition XML resource path
37 */
38 protected AbstractDriverLoader(String path) {
Thomas Vachuska43de6ee2017-03-15 15:45:23 -070039 super(path);
alshabib77b88482015-04-07 15:47:50 -070040 }
41
alshabib77b88482015-04-07 15:47:50 -070042}