Package com.composum.sling.core.util
Class ServiceHandle<T>
- java.lang.Object
-
- com.composum.sling.core.util.ServiceHandle<T>
-
public class ServiceHandle<T> extends Object
a service handler to enable static access to service instances
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ServiceHandle.InstanceTracker
-
Field Summary
Fields Modifier and Type Field Description protected T
service
protected ServiceHandle.InstanceTracker
serviceTracker
protected Class<T>
type
static long
WAIT_TIMEOUT
-
Constructor Summary
Constructors Constructor Description ServiceHandle(@NotNull Class<T> type)
-
-
-
Field Detail
-
WAIT_TIMEOUT
public static final long WAIT_TIMEOUT
- See Also:
- Constant Field Values
-
service
protected transient T service
-
serviceTracker
protected transient ServiceHandle.InstanceTracker serviceTracker
-
-
Method Detail
-
getService
@NotNull public T getService()
-
-