public class ServiceGetter<T>
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| protected Future<T> | callfutOngoing call future. | 
| protected IInternalAccess | componentThe internal access. | 
| protected long | delayThe delay between searches when no service was found. | 
| protected long | lastsearchThe time of the last search. | 
| protected java.lang.String | scopeThe scope. | 
| protected T | serviceThe cached service. | 
| protected java.lang.Class<T> | typeThe service type. | 
| Constructor and Description | 
|---|
| ServiceGetter(IInternalAccess component,
             java.lang.Class<T> type,
             java.lang.String scope)Create a new service getter. | 
| ServiceGetter(IInternalAccess component,
             long delay,
             java.lang.Class<T> type,
             java.lang.String scope)Create a new service getter. | 
| Modifier and Type | Method and Description | 
|---|---|
| T | getLastService()Get last service. | 
| IFuture<T> | getService()Get or search the service with a delay in case not found. | 
| void | resetService()Set the service to null, if e.g. | 
protected IInternalAccess component
protected java.lang.Class<T> type
protected T service
protected java.lang.String scope
protected long lastsearch
protected long delay
public ServiceGetter(IInternalAccess component, java.lang.Class<T> type, java.lang.String scope)
public ServiceGetter(IInternalAccess component, long delay, java.lang.Class<T> type, java.lang.String scope)