Package org.osgi.test.common.service
Class ServiceConfiguration<S>
java.lang.Object
org.osgi.test.common.service.ServiceConfiguration<S>
- All Implemented Interfaces:
AutoCloseable,ServiceAware<S>
-
Constructor Summary
ConstructorsConstructorDescriptionServiceConfiguration(Class<S> serviceType, String format, String[] args, int cardinality, long timeout) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intOverride by sub types in order to return a customizer used by the tracker.org.osgi.framework.FiltergetService(org.osgi.framework.ServiceReference<S> reference) org.osgi.framework.ServiceReference<S>longintinit(org.osgi.framework.BundleContext bundleContext) booleanisEmpty()intsize()toString()waitForService(long timeout)
-
Constructor Details
-
ServiceConfiguration
-
ServiceConfiguration
-
-
Method Details
-
init
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceServiceAware<S>
-
toString
-
getCardinality
public int getCardinality()- Specified by:
getCardinalityin interfaceServiceAware<S>
-
getCustomizer
Override by sub types in order to return a customizer used by the tracker. The default implementation returnsnull.- Returns:
- customizer used by the tracker
-
getFilter
public org.osgi.framework.Filter getFilter()- Specified by:
getFilterin interfaceServiceAware<S>
-
getService
- Specified by:
getServicein interfaceServiceAware<S>
-
getService
- Specified by:
getServicein interfaceServiceAware<S>
-
getServiceReference
- Specified by:
getServiceReferencein interfaceServiceAware<S>
-
getServiceReferences
- Specified by:
getServiceReferencesin interfaceServiceAware<S>
-
getServices
- Specified by:
getServicesin interfaceServiceAware<S>
-
getServiceType
- Specified by:
getServiceTypein interfaceServiceAware<S>
-
getTimeout
public long getTimeout()- Specified by:
getTimeoutin interfaceServiceAware<S>
-
getTrackingCount
public int getTrackingCount()- Specified by:
getTrackingCountin interfaceServiceAware<S>
-
getTracked
- Specified by:
getTrackedin interfaceServiceAware<S>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceServiceAware<S>
-
size
public int size()- Specified by:
sizein interfaceServiceAware<S>
-
waitForService
- Specified by:
waitForServicein interfaceServiceAware<S>- Throws:
InterruptedException
-