blob: 456a9667f2c368f65b2db1bcf6d3867db2bbfc42 [file] [log] [blame]
Pierre De Rop8be50732009-12-04 22:18:54 +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 */
19package org.apache.felix.dependencymanager.management;
20
21/**
22 * Describes a service component. Service components form descriptions of services
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 */
29public interface ServiceComponent {
30 /** Names for the states of this component. */
31 public static final String[] STATE_NAMES = { "unregistered", "registered" };
32 /** State constant for an unregistered component. */
33 public static final int STATE_UNREGISTERED = 0;
34 /** State constant for a registered component. */
35 public static final int STATE_REGISTERED = 1;
36 /** Returns a list of dependencies associated with this service component. */
37 public ServiceComponentDependency[] getComponentDependencies();
38 /** Returns the name of this service component. */
39 public String getName();
40 /** Returns the state of this service component. */
41 public int getState();
42}