java.lang.Object | |
↳ | org.eclipse.sisu.osgi.ServiceBindings |
On-demand publisher of Bindings from the OSGi service registry.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ServiceBindings(BundleContext context, String allow, String ignore, int maxRank)
Creates new publisher of service bindings, using the given OSGi
BundleContext to track services. | |||||||||||
ServiceBindings(BundleContext context)
Creates new publisher of service bindings, using the given OSGi
BundleContext to track services. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static String | defaultAllow() | ||||||||||
static String | defaultIgnore() | ||||||||||
int |
maxBindingRank()
Estimates the maximum rank this publisher may assign to a
Binding . | ||||||||||
<T> void |
subscribe(BindingSubscriber<T> subscriber)
Subscribes the given
BindingSubscriber to receive Binding s. | ||||||||||
<T> void |
unsubscribe(BindingSubscriber<T> subscriber)
Stops the given
BindingSubscriber from receiving Binding s. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.eclipse.sisu.inject.BindingPublisher
|
Creates new publisher of service bindings, using the given OSGi BundleContext
to track services.
The globbed patterns control whether tracking requests for particular types are allowed or ignored.
Any published bindings are ranked according to their service ranking (up to the given maximum).
context | The tracking context |
---|---|
allow | Globbed pattern of packages/types to allow |
ignore | Globbed pattern of packages/types to ignore |
maxRank | Maximum binding rank |
Creates new publisher of service bindings, using the given OSGi BundleContext
to track services.
Uses default allow/ignore settings and assigns any published services the lowest possible ranking.
context | The tracking context |
---|
org.eclipse.sisu.osgi.ServiceBindings.allow
system propertyorg.eclipse.sisu.osgi.ServiceBindings.ignore
system propertyEstimates the maximum rank this publisher may assign to a Binding
.
Subscribes the given BindingSubscriber
to receive Binding
s.
subscriber | The subscriber |
---|
Stops the given BindingSubscriber
from receiving Binding
s.
subscriber | The subscriber |
---|