Class ServiceGetter<T>
- java.lang.Object
-
- jadex.bridge.service.component.interceptors.ServiceGetter<T>
-
public class ServiceGetter<T> extends java.lang.Object
The service getter allows for getting a service
-
-
Field Summary
Fields Modifier and Type Field Description protected Future<T>
callfut
Ongoing call future.protected IInternalAccess
component
The internal access.protected long
delay
The delay between searches when no service was found.protected long
lastsearch
The time of the last search.protected ServiceScope
scope
The scope.protected T
service
The cached service.protected java.lang.Class<T>
type
The 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 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.
-
-
-
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.
-
-