Marcel Offermans | a962bc9 | 2009-11-21 17:59:33 +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 | */ |
Marcel Offermans | 8b93efa | 2010-07-02 18:27:21 +0000 | [diff] [blame] | 19 | package org.apache.felix.dm; |
Marcel Offermans | a962bc9 | 2009-11-21 17:59:33 +0000 | [diff] [blame] | 20 | |
| 21 | /** |
Marcel Offermans | faaed47 | 2010-09-08 10:07:32 +0000 | [diff] [blame] | 22 | * Describes a component dependency. They form descriptions of dependencies |
Marcel Offermans | a962bc9 | 2009-11-21 17:59:33 +0000 | [diff] [blame] | 23 | * that are managed by the dependency manager. They can be used to query their state |
| 24 | * for monitoring tools. The dependency manager shell command is an example of |
| 25 | * such a tool. |
| 26 | * |
| 27 | * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> |
| 28 | */ |
Marcel Offermans | faaed47 | 2010-09-08 10:07:32 +0000 | [diff] [blame] | 29 | public interface ComponentDependencyDeclaration { |
Marcel Offermans | a962bc9 | 2009-11-21 17:59:33 +0000 | [diff] [blame] | 30 | /** Names for the states of this dependency. */ |
| 31 | public static final String[] STATE_NAMES = { |
| 32 | "optional unavailable", |
| 33 | "optional available", |
| 34 | "required unavailable", |
| 35 | "required available" |
| 36 | }; |
| 37 | /** State constant for an unavailable, optional dependency. */ |
| 38 | public static final int STATE_UNAVAILABLE_OPTIONAL = 0; |
| 39 | /** State constant for an available, optional dependency. */ |
| 40 | public static final int STATE_AVAILABLE_OPTIONAL = 1; |
| 41 | /** State constant for an unavailable, required dependency. */ |
| 42 | public static final int STATE_UNAVAILABLE_REQUIRED = 2; |
| 43 | /** State constant for an available, required dependency. */ |
| 44 | public static final int STATE_AVAILABLE_REQUIRED = 3; |
| 45 | /** Returns the name of this dependency. */ |
| 46 | public String getName(); |
| 47 | /** Returns the name of the type of this dependency. */ |
| 48 | public String getType(); |
| 49 | /** Returns the state of this dependency. */ |
| 50 | public int getState(); |
| 51 | } |