Package org.eclipse.sisu.osgi
Class ServiceBinding<T>
java.lang.Object
org.eclipse.sisu.osgi.ServiceBinding<T>
- All Implemented Interfaces:
com.google.inject.Binding<T>,com.google.inject.Provider<T>,com.google.inject.spi.Element,javax.inject.Provider<T>
final class ServiceBinding<T>
extends Object
implements com.google.inject.Binding<T>, com.google.inject.Provider<T>
Service
Binding backed by an OSGi ServiceReference.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServiceBinding(org.osgi.framework.BundleContext context, String clazzName, int maxRank, org.osgi.framework.ServiceReference<T> reference) -
Method Summary
Modifier and TypeMethodDescription<V> VacceptScopingVisitor(com.google.inject.spi.BindingScopingVisitor<V> visitor) <V> VacceptTargetVisitor(com.google.inject.spi.BindingTargetVisitor<? super T, V> visitor) <V> VacceptVisitor(com.google.inject.spi.ElementVisitor<V> visitor) voidapplyTo(com.google.inject.Binder binder) get()com.google.inject.Key<T> getKey()com.google.inject.Provider<T> private static intgetServiceRanking(org.osgi.framework.ServiceReference<?> reference) (package private) booleanisCompatibleWith(BindingSubscriber<T> subscriber) (package private) intrank()
-
Field Details
-
key
-
instance
-
rank
private final int rank
-
-
Constructor Details
-
ServiceBinding
ServiceBinding(org.osgi.framework.BundleContext context, String clazzName, int maxRank, org.osgi.framework.ServiceReference<T> reference) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
-
Method Details
-
getKey
- Specified by:
getKeyin interfacecom.google.inject.Binding<T>
-
getProvider
- Specified by:
getProviderin interfacecom.google.inject.Binding<T>
-
get
-
getSource
- Specified by:
getSourcein interfacecom.google.inject.spi.Element
-
applyTo
public void applyTo(com.google.inject.Binder binder) - Specified by:
applyToin interfacecom.google.inject.spi.Element
-
acceptVisitor
public <V> V acceptVisitor(com.google.inject.spi.ElementVisitor<V> visitor) - Specified by:
acceptVisitorin interfacecom.google.inject.spi.Element
-
acceptTargetVisitor
- Specified by:
acceptTargetVisitorin interfacecom.google.inject.Binding<T>
-
acceptScopingVisitor
public <V> V acceptScopingVisitor(com.google.inject.spi.BindingScopingVisitor<V> visitor) - Specified by:
acceptScopingVisitorin interfacecom.google.inject.Binding<T>
-
isCompatibleWith
-
rank
int rank() -
getServiceRanking
private static int getServiceRanking(org.osgi.framework.ServiceReference<?> reference)
-