Interface ServiceMetadata
-
- All Superinterfaces:
ComponentMetadata,Metadata,NonNullMetadata
@ConsumerType public interface ServiceMetadata extends ComponentMetadata
Metadata for a service to be registered by the Blueprint Container when enabled.This is specified by the
serviceelement.
-
-
Field Summary
Fields Modifier and Type Field Description static intAUTO_EXPORT_ALL_CLASSESAdvertise all Java classes and interfaces in the component instance type as service interfaces.static intAUTO_EXPORT_CLASS_HIERARCHYAdvertise all Java classes in the hierarchy of the component instance type as service interfaces.static intAUTO_EXPORT_DISABLEDDo not auto-detect types for advertised service interfacesstatic intAUTO_EXPORT_INTERFACESAdvertise all Java interfaces implemented by the component instance type as service interfaces.-
Fields inherited from interface org.osgi.service.blueprint.reflect.ComponentMetadata
ACTIVATION_EAGER, ACTIVATION_LAZY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetAutoExport()Return the auto-export mode for the service.java.util.List<java.lang.String>getInterfaces()Return the type names of the interfaces that the service should be advertised as supporting.intgetRanking()Return the ranking value to use when advertising the service.java.util.Collection<RegistrationListener>getRegistrationListeners()Return the registration listeners to be notified when the service is registered and unregistered with the framework.TargetgetServiceComponent()Return the Metadata for the component to be exported as a service.java.util.List<MapEntry>getServiceProperties()Return the user declared properties to be advertised with the service.-
Methods inherited from interface org.osgi.service.blueprint.reflect.ComponentMetadata
getActivation, getDependsOn, getId
-
-
-
-
Field Detail
-
AUTO_EXPORT_DISABLED
static final int AUTO_EXPORT_DISABLED
Do not auto-detect types for advertised service interfaces- See Also:
getAutoExport(), Constant Field Values
-
AUTO_EXPORT_INTERFACES
static final int AUTO_EXPORT_INTERFACES
Advertise all Java interfaces implemented by the component instance type as service interfaces.- See Also:
getAutoExport(), Constant Field Values
-
AUTO_EXPORT_CLASS_HIERARCHY
static final int AUTO_EXPORT_CLASS_HIERARCHY
Advertise all Java classes in the hierarchy of the component instance type as service interfaces.- See Also:
getAutoExport(), Constant Field Values
-
AUTO_EXPORT_ALL_CLASSES
static final int AUTO_EXPORT_ALL_CLASSES
Advertise all Java classes and interfaces in the component instance type as service interfaces.- See Also:
getAutoExport(), Constant Field Values
-
-
Method Detail
-
getServiceComponent
Target getServiceComponent()
Return the Metadata for the component to be exported as a service. This is specified inline or via therefattribute of the service.- Returns:
- The Metadata for the component to be exported as a service.
-
getInterfaces
java.util.List<java.lang.String> getInterfaces()
Return the type names of the interfaces that the service should be advertised as supporting. This is specified in theinterfaceattribute or childinterfaceselement of the service.- Returns:
- An immutable List of
Stringfor the type names of the interfaces that the service should be advertised as supporting. The List is empty if usingauto-exportor no interface names are specified for the service.
-
getAutoExport
int getAutoExport()
Return the auto-export mode for the service. This is specified by theauto-exportattribute of the service.- Returns:
- The auto-export mode for the service.
- See Also:
AUTO_EXPORT_DISABLED,AUTO_EXPORT_INTERFACES,AUTO_EXPORT_CLASS_HIERARCHY,AUTO_EXPORT_ALL_CLASSES
-
getServiceProperties
java.util.List<MapEntry> getServiceProperties()
Return the user declared properties to be advertised with the service. This is specified by theservice-propertieselement of the service.- Returns:
- An immutable List of
MapEntryobjects for the user declared properties to be advertised with the service. The List is empty if no service properties are specified for the service.
-
getRanking
int getRanking()
Return the ranking value to use when advertising the service. If the ranking value is zero, the service must be registered without aservice.rankingservice property. This is specified by therankingattribute of the service.- Returns:
- The ranking value to use when advertising the service.
-
getRegistrationListeners
java.util.Collection<RegistrationListener> getRegistrationListeners()
Return the registration listeners to be notified when the service is registered and unregistered with the framework. This is specified by theregistration-listenerelements of the service.- Returns:
- An immutable Collection of
RegistrationListenerobjects to be notified when the service is registered and unregistered with the framework. The Collection is empty if no registration listeners are specified for the service.
-
-