Class GlobalServicePoolTargetResolver
- java.lang.Object
- 
- jadex.platform.service.globalservicepool.GlobalServicePoolTargetResolver
 
- 
- All Implemented Interfaces:
- ITargetResolver
 
 public class GlobalServicePoolTargetResolver extends java.lang.Object implements ITargetResolver The service pool target resolver is the client side of a global pool manager. It has the purpose the direct the call to a suitable service worker from the queue of workers. The resolver is used by a) the RemoteMethodInvocationHandler in case of RMI calls b) the IntelligentProxyInterceptor in case of local calls The ITargetResolver.TARGETRESOLVER constant is used by both to determine the redirection target.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.Set<IServiceIdentifier>brokensThe reported to be broken services.protected intpositionThe position counter.protected IIntermediateFuture<IService>searchfutureThe search future.protected IndexMap<IServiceIdentifier,IService>servicesThe cached target services.protected java.util.Map<IServiceIdentifier,UsageInfo>usageinfosThe current usage info.- 
Fields inherited from interface jadex.bridge.ITargetResolverTARGETRESOLVER
 
- 
 - 
Constructor SummaryConstructors Constructor Description GlobalServicePoolTargetResolver()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<IService>determineTarget(IServiceIdentifier sid, IExternalAccess agent, IServiceIdentifier broken)Determine the target of a call.protected IFuture<java.lang.Void>reportUsage(IService ser, IExternalAccess agent, IServiceIdentifier sid)Save usage info and send it in certain intervals.protected IIntermediateFuture<IService>searchServices(IServiceIdentifier sid, IExternalAccess agent)Search for services a call can be redirected to.
 
- 
- 
- 
Field Detail- 
servicesprotected IndexMap<IServiceIdentifier,IService> services The cached target services.
 - 
brokensprotected java.util.Set<IServiceIdentifier> brokens The reported to be broken services.
 - 
positionprotected int position The position counter.
 - 
searchfutureprotected IIntermediateFuture<IService> searchfuture The search future. Only one search at the same time.
 - 
usageinfosprotected java.util.Map<IServiceIdentifier,UsageInfo> usageinfos The current usage info.
 
- 
 - 
Method Detail- 
determineTargetpublic IFuture<IService> determineTarget(IServiceIdentifier sid, IExternalAccess agent, IServiceIdentifier broken) Determine the target of a call.- Specified by:
- determineTargetin interface- ITargetResolver
- Parameters:
- sid- The service identifier of the original call.
- agent- The external access.
- Returns:
- The new service that should be called instead of the original one.
 
 - 
searchServicesprotected IIntermediateFuture<IService> searchServices(IServiceIdentifier sid, IExternalAccess agent) Search for services a call can be redirected to. Contacts the IGlobalPoolManagementService to get services.
 - 
reportUsageprotected IFuture<java.lang.Void> reportUsage(IService ser, IExternalAccess agent, IServiceIdentifier sid) Save usage info and send it in certain intervals.
 
- 
 
-