Package org.eclipse.sisu.inject
Interface BindingPublisher
-
- All Known Implementing Classes:
InjectorBindings,ServiceBindings
public interface BindingPublisherPublisher ofBindings to interestedBindingSubscribers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Tadapt(Class<T> type)Attempts to adapt this publisher to the given type.intmaxBindingRank()Estimates 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 Detail
-
subscribe
<T> void subscribe(BindingSubscriber<T> subscriber)
Subscribes the givenBindingSubscriberto receiveBindings.- Parameters:
subscriber- The subscriber
-
unsubscribe
<T> void unsubscribe(BindingSubscriber<T> subscriber)
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
<T> T adapt(Class<T> type)
Attempts to adapt this publisher to the given type.- Parameters:
type- The target type- Returns:
- Adapted instance;
nullif it couldn't be adapted
-
-