blob: beece720cd78006e0c3723296a423d743730de02 [file] [log] [blame]
Marcel Offermanse14b3422009-11-25 23:04:32 +00001/*
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 Rop809568b2009-12-04 22:43:17 +000019package org.apache.felix.dm.impl.dependencies;
20
21import org.apache.felix.dm.dependencies.Dependency;
Marcel Offermansea89b862010-06-24 13:14:43 +000022import org.apache.felix.dm.service.Service;
Marcel Offermanse14b3422009-11-25 23:04:32 +000023
24public 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 Offermansea89b862010-06-24 13:14:43 +000047 public void initService(); // was an implementation method TODO we use it in ConfDepImpl but should not (probably)
Marcel Offermanse14b3422009-11-25 23:04:32 +000048 public boolean isRegistered(); // impl method
49 public Object[] getCompositionInstances(); // impl method
Marcel Offermansea89b862010-06-24 13:14:43 +000050
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 Offermanse14b3422009-11-25 23:04:32 +000057}