Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.osgi.service.serviceloader;
Service Loader Capability and Requirement Namespace.

This class defines the names for the attributes and directives for this namespace.

All unspecified capability attributes are of one of the following types:

  • String
  • Version
  • Long
  • Double
  • List<String>
  • List<Version>
  • List<Long>
  • List<Double>
and are used as arbitrary matching attributes for the capability. The values associated with the specified directive and attribute keys are of type String, unless otherwise indicated.

All unspecified capability attributes, unless the attribute name starts with dot ('.' \u002E), are also used as service properties when registering a Service Provider as a service.

$Id: 14423da88868681498b290691894d2d7eb8f5d5a $
public final class ServiceLoaderNamespace extends Namespace {

Namespace name for service loader capabilities and requirements.

Also, the capability attribute used to specify the fully qualified name of the service type.

	public static final String	SERVICELOADER_NAMESPACE"osgi.serviceloader";

The capability directive used to specify the implementation classes of the service. The value of this attribute must be of type List<String>.

If this directive is not specified, then all advertised Service Providers that match the service type name must be registered. If this directive is specified, then only Service Providers that match the service type name whose implementation class is contained in the value of this attribute must be registered. To not register a service for this capability use an empty string.

	public static final String	CAPABILITY_REGISTER_DIRECTIVE"register";
		// empty
New to GrepCode? Check out our FAQ X