Marcel Offermans | e14b342 | 2009-11-25 23:04:32 +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 | */ |
Pierre De Rop | 809568b | 2009-12-04 22:43:17 +0000 | [diff] [blame] | 19 | package org.apache.felix.dm.impl.dependencies; |
| 20 | |
| 21 | import org.apache.felix.dm.dependencies.Dependency; |
Marcel Offermans | ea89b86 | 2010-06-24 13:14:43 +0000 | [diff] [blame^] | 22 | import org.apache.felix.dm.service.Service; |
Marcel Offermans | e14b342 | 2009-11-25 23:04:32 +0000 | [diff] [blame] | 23 | |
| 24 | public interface DependencyService { |
| 25 | /** |
| 26 | * Will be called when the dependency becomes available. |
| 27 | * |
| 28 | * @param dependency the dependency |
| 29 | */ |
| 30 | public void dependencyAvailable(Dependency dependency); |
| 31 | |
| 32 | /** |
| 33 | * Will be called when the dependency changes. |
| 34 | * |
| 35 | * @param dependency the dependency |
| 36 | */ |
| 37 | public void dependencyUnavailable(Dependency dependency); |
| 38 | |
| 39 | /** |
| 40 | * Will be called when the dependency becomes unavailable. |
| 41 | * |
| 42 | * @param dependency the dependency |
| 43 | */ |
| 44 | public void dependencyChanged(Dependency dependency); |
| 45 | |
| 46 | public Object getService(); // is also defined on the Service interface |
Marcel Offermans | ea89b86 | 2010-06-24 13:14:43 +0000 | [diff] [blame^] | 47 | public void initService(); // was an implementation method TODO we use it in ConfDepImpl but should not (probably) |
Marcel Offermans | e14b342 | 2009-11-25 23:04:32 +0000 | [diff] [blame] | 48 | public boolean isRegistered(); // impl method |
| 49 | public Object[] getCompositionInstances(); // impl method |
Marcel Offermans | ea89b86 | 2010-06-24 13:14:43 +0000 | [diff] [blame^] | 50 | |
| 51 | /** |
| 52 | * Can be called by the dependency whenever it wants to invoke callback methods. |
| 53 | */ |
| 54 | public void invokeCallbackMethod(Object[] instances, String methodName, Class[][] signatures, Object[][] parameters); |
| 55 | |
| 56 | public Service getServiceInterface(); |
Marcel Offermans | e14b342 | 2009-11-25 23:04:32 +0000 | [diff] [blame] | 57 | } |