Package org.eclipse.sisu.inject
Interface BindingPublisher
-
- All Known Implementing Classes:
InjectorBindings
,ServiceBindings
public interface BindingPublisher
Publisher ofBinding
s to interestedBindingSubscriber
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
adapt(java.lang.Class<T> type)
Attempts to adapt this publisher to the given type.int
maxBindingRank()
Estimates the maximum rank this publisher may assign to aBinding
.<T> void
subscribe(BindingSubscriber<T> subscriber)
Subscribes the givenBindingSubscriber
to receiveBinding
s.<T> void
unsubscribe(BindingSubscriber<T> subscriber)
Stops the givenBindingSubscriber
from receivingBinding
s.
-
-
-
Method Detail
-
subscribe
<T> void subscribe(BindingSubscriber<T> subscriber)
Subscribes the givenBindingSubscriber
to receiveBinding
s.- Parameters:
subscriber
- The subscriber
-
unsubscribe
<T> void unsubscribe(BindingSubscriber<T> subscriber)
Stops the givenBindingSubscriber
from receivingBinding
s.- Parameters:
subscriber
- The subscriber
-
maxBindingRank
int maxBindingRank()
Estimates the maximum rank this publisher may assign to aBinding
.- Returns:
- Maximum binding rank
-
adapt
<T> T adapt(java.lang.Class<T> type)
Attempts to adapt this publisher to the given type.- Parameters:
type
- The target type- Returns:
- Adapted instance;
null
if it couldn't be adapted - Since:
- 0.9.0.M1
-
-