Package org.eclipse.sisu.inject
Interface BindingPublisher
- All Known Implementing Classes:
InjectorBindings,ServiceBindings
public interface BindingPublisher
Publisher of
Bindings to interested BindingSubscribers.-
Method Summary
Modifier and TypeMethodDescription<T> TAttempts to adapt this publisher to the given type.intEstimates the maximum rank this publisher may assign to aBinding.<T> voidsubscribe(BindingSubscriber<T> subscriber) Subscribes the givenBindingSubscriberto receiveBindings.<T> voidunsubscribe(BindingSubscriber<T> subscriber) Stops the givenBindingSubscriberfrom receivingBindings.
-
Method Details
-
subscribe
Subscribes the givenBindingSubscriberto receiveBindings.- Parameters:
subscriber- The subscriber
-
unsubscribe
Stops the givenBindingSubscriberfrom receivingBindings.- Parameters:
subscriber- The subscriber
-
maxBindingRank
int maxBindingRank()Estimates the maximum rank this publisher may assign to aBinding.- Returns:
- Maximum binding rank
-
adapt
Attempts to adapt this publisher to the given type.- Parameters:
type- The target type- Returns:
- Adapted instance;
nullif it couldn't be adapted - Since:
- 0.9.0.M1
-