Marcel Offermans | 3d92121 | 2010-08-09 13:37:02 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | * or more contributor license agreements. See the NOTICE file |
| 4 | * distributed with this work for additional information |
| 5 | * regarding copyright ownership. The ASF licenses this file |
| 6 | * to you under the Apache License, Version 2.0 (the |
| 7 | * "License"); you may not use this file except in compliance |
| 8 | * with the License. You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, |
| 13 | * software distributed under the License is distributed on an |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | * KIND, either express or implied. See the License for the |
| 16 | * specific language governing permissions and limitations |
| 17 | * under the License. |
| 18 | */ |
| 19 | package org.apache.felix.dm; |
| 20 | |
Marcel Offermans | 5be5f14 | 2011-04-26 10:47:12 +0000 | [diff] [blame] | 21 | /** |
Marcel Offermans | cba269a | 2013-01-18 11:00:56 +0000 | [diff] [blame] | 22 | * Dependency activation interface that must be implemented by any |
| 23 | * new dependency and is used by the dependency manager to start and |
| 24 | * stop the dependency after it has been associated with a component. |
| 25 | * |
Marcel Offermans | 5be5f14 | 2011-04-26 10:47:12 +0000 | [diff] [blame] | 26 | * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> |
| 27 | */ |
Marcel Offermans | 3d92121 | 2010-08-09 13:37:02 +0000 | [diff] [blame] | 28 | public interface DependencyActivation { |
Marcel Offermans | cba269a | 2013-01-18 11:00:56 +0000 | [diff] [blame] | 29 | /** |
| 30 | * Invoked when the dependency should start. |
| 31 | * |
| 32 | * @param service the component this dependency belongs to |
| 33 | */ |
| 34 | public void start(DependencyService service); |
| 35 | |
| 36 | /** |
| 37 | * Invoked when the dependency should stop. |
| 38 | * |
| 39 | * @param service the component this dependency belongs to |
| 40 | */ |
| 41 | public void stop(DependencyService service); |
Marcel Offermans | 3d92121 | 2010-08-09 13:37:02 +0000 | [diff] [blame] | 42 | } |