blob: c4f6ee317781c676be12569d4b5ceed821713a8b [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 */
Marcel Offermans3d921212010-08-09 13:37:02 +000019package org.apache.felix.dm;
Pierre De Rop809568b2009-12-04 22:43:17 +000020
Marcel Offermanse14b3422009-11-25 23:04:32 +000021
22public interface DependencyService {
23 /**
24 * Will be called when the dependency becomes available.
25 *
26 * @param dependency the dependency
27 */
28 public void dependencyAvailable(Dependency dependency);
29
30 /**
31 * Will be called when the dependency changes.
32 *
33 * @param dependency the dependency
34 */
35 public void dependencyUnavailable(Dependency dependency);
36
37 /**
38 * Will be called when the dependency becomes unavailable.
39 *
40 * @param dependency the dependency
41 */
42 public void dependencyChanged(Dependency dependency);
43
44 public Object getService(); // is also defined on the Service interface
Marcel Offermansea89b862010-06-24 13:14:43 +000045 public void initService(); // was an implementation method TODO we use it in ConfDepImpl but should not (probably)
Marcel Offermanse14b3422009-11-25 23:04:32 +000046 public boolean isRegistered(); // impl method
47 public Object[] getCompositionInstances(); // impl method
Marcel Offermansea89b862010-06-24 13:14:43 +000048
Marcel Offermansb7b6cd42010-10-14 14:47:54 +000049 public boolean isInstantiated();
50
Marcel Offermansea89b862010-06-24 13:14:43 +000051 /**
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
Marcel Offermansfaaed472010-09-08 10:07:32 +000056 public Component getServiceInterface();
Marcel Offermanse14b3422009-11-25 23:04:32 +000057}