Class ServiceGetter<T>
- java.lang.Object
-
- jadex.bridge.service.component.interceptors.ServiceGetter<T>
-
public class ServiceGetter<T> extends java.lang.ObjectThe service getter allows for getting a service
-
-
Field Summary
Fields Modifier and Type Field Description protected Future<T>callfutOngoing call future.protected IInternalAccesscomponentThe internal access.protected longdelayThe delay between searches when no service was found.protected longlastsearchThe time of the last search.protected ServiceScopescopeThe scope.protected TserviceThe cached service.protected java.lang.Class<T>typeThe service type.
-
Constructor Summary
Constructors Constructor Description ServiceGetter(IInternalAccess component, long delay, java.lang.Class<T> type, ServiceScope scope)Create a new service getter.ServiceGetter(IInternalAccess component, java.lang.Class<T> type, ServiceScope scope)Create a new service getter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetLastService()Get last service.IFuture<T>getService()Get or search the service with a delay in case not found.voidresetService()Set the service to null, if e.g.
-
-
-
Field Detail
-
component
protected IInternalAccess component
The internal access.
-
type
protected java.lang.Class<T> type
The service type.
-
service
protected T service
The cached service.
-
scope
protected ServiceScope scope
The scope.
-
lastsearch
protected long lastsearch
The time of the last search.
-
delay
protected long delay
The delay between searches when no service was found.
-
-
Constructor Detail
-
ServiceGetter
public ServiceGetter(IInternalAccess component, java.lang.Class<T> type, ServiceScope scope)
Create a new service getter.
-
ServiceGetter
public ServiceGetter(IInternalAccess component, long delay, java.lang.Class<T> type, ServiceScope scope)
Create a new service getter.
-
-