Debian Codegraph @

src/org/osgi/service/serviceloader/ServiceLoaderNamespace.java

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
•1 /*
2 * Copyright (c) OSGi Alliance (2012, 2014). All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.osgi.service.serviceloader;
18
19 import org.osgi.resource.Namespace;
20
21 /**
22 * Service Loader Capability and Requirement Namespace.
23 *
24 * <p>
25 * This class defines the names for the attributes and directives for this
26 * namespace.
27 *
28 * <p>
29 * All unspecified capability attributes are of one of the following types:
30 * <ul>
31 * <li>{@code String}</li>
32 * <li>{@code Version}</li>
33 * <li>{@code Long}</li>
34 * <li>{@code Double}</li>
35 * <li>{@code List<String>}</li>
36 * <li>{@code List<Version>}</li>
37 * <li>{@code List<Long>}</li>
38 * <li>{@code List<Double>}</li>
39 * </ul>
40 * and are used as arbitrary matching attributes for the capability. The values
41 * associated with the specified directive and attribute keys are of type
42 * {@code String}, unless otherwise indicated.
43 *
44 * <p>
45 * All unspecified capability attributes, unless the attribute name starts with
46 * full stop ({@code '.'} &#92;u002E), are also used as service properties when
47 * registering a Service Provider as a service.
48 *
49 * @Immutable
50 * @author $Id: dc10ac5db968434a8af4d141e8d5e6b424b3cd49 $
51 */
52 public final class ServiceLoaderNamespace extends Namespace {
53
54 /**
55 * Namespace name for service loader capabilities and requirements.
56 *
57 * <p>
58 * Also, the capability attribute used to specify the fully qualified name
59 * of the service type.
60 */
61 public static final String SERVICELOADER_NAMESPACE = "osgi.serviceloader";
62
63 /**
64 * The capability directive used to specify the implementation classes of
65 * the service. The value of this attribute must be of type
66 * {@code List<String>}.
67 *
68 * <p>
69 * If this directive is not specified, then all advertised Service Providers
70 * that match the service type name must be registered. If this directive is
71 * specified, then only Service Providers that match the service type name
72 * whose implementation class is contained in the value of this attribute
73 * must be registered. To not register a service for this capability use an
74 * empty string.
75 */
76 public static final String CAPABILITY_REGISTER_DIRECTIVE = "register";
77
78 private ServiceLoaderNamespace() {
79 // empty
80 }
81 }