public class DefaultServiceFetcher extends java.lang.Object implements IRequiredServiceFetcher
| Modifier and Type | Class and Description | 
|---|---|
class  | 
DefaultServiceFetcher.StoreDelegationResultListener<T>
Simple listener that can store the result in a member variable. 
 | 
class  | 
DefaultServiceFetcher.StoreIntermediateDelegationResultListener<T>
Simple listener that can store the result in a member variable. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected IInternalAccess | 
ia
The internal access. 
 | 
protected boolean | 
realtime
The realtime flag for call timeouts. 
 | 
protected java.lang.Object | 
result
The cached result. 
 | 
| Constructor and Description | 
|---|
DefaultServiceFetcher(IInternalAccess ia,
                     boolean realtime)
Create a new required service fetcher. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected <T> IFuture<T> | 
checkResult(T result,
           boolean rebind,
           RequiredServiceBinding bd)  | 
protected <T> IIntermediateFuture<T> | 
checkResults(java.util.List<T> results,
            boolean rebind,
            RequiredServiceBinding bd)  | 
protected IFuture<IExternalAccess> | 
createComponent(IInternalAccess provider,
               RequiredServiceInfo info,
               RequiredServiceBinding binding)
Create component and get external access for component. 
 | 
protected IFuture<IComponentIdentifier> | 
createComponentIdentifier(IInternalAccess provider,
                         java.lang.String name,
                         IComponentIdentifier parent)
Create component identifier from name. 
 | 
<T> IFuture<T> | 
createProxy(IService service,
           RequiredServiceInfo info,
           RequiredServiceBinding binding)
Create a required service proxy. 
 | 
java.util.Map<java.lang.String,java.lang.Object> | 
getArguments(ComponentInstanceInfo component,
            java.lang.String[] imports,
            IValueFetcher fetcher,
            java.lang.ClassLoader cl)
Get the arguments. 
 | 
IFuture<java.util.Collection<IExternalAccess>> | 
getChildExternalAccesses(IComponentIdentifier cid,
                        IInternalAccess provider,
                        RequiredServiceInfo info,
                        RequiredServiceBinding binding)
Get a fitting (of given type) child component. 
 | 
protected IFuture<IExternalAccess> | 
getExternalAccess(IInternalAccess provider,
                 IComponentIdentifier cid)
Get external access for component identifier. 
 | 
protected IFuture<IExternalAccess> | 
getExternalAccess(IInternalAccess provider,
                 java.lang.String name,
                 IComponentIdentifier parent)
Get external access for component name. 
 | 
protected IFuture<IExternalAccess> | 
getExternalAccessByName(IInternalAccess provider,
                       RequiredServiceInfo info,
                       RequiredServiceBinding binding)
Get the external access of a component by its name. 
 | 
protected IFuture<java.util.Collection<IExternalAccess>> | 
getExternalAccessesByType(IInternalAccess provider,
                         RequiredServiceInfo info,
                         RequiredServiceBinding binding)
Get the external access of a component by type. 
 | 
<T> T | 
getLastService()
Get the result of the last search. 
 | 
<T> java.util.Collection<T> | 
getLastServices()
Get the result of the last search. 
 | 
IFuture<IExternalAccess> | 
getParentAccess(IInternalAccess provider,
               RequiredServiceInfo info,
               RequiredServiceBinding binding)  | 
<T> IFuture<T> | 
getService(RequiredServiceInfo info,
          RequiredServiceBinding bd,
          boolean rebind,
          IAsyncFilter<T> filter)
Get a required service. 
 | 
<T> ITerminableIntermediateFuture<T> | 
getServices(RequiredServiceInfo info,
           RequiredServiceBinding bd,
           boolean rebind,
           IAsyncFilter<T> filter)
Get a required multi service. 
 | 
protected IInternalAccess ia
protected java.lang.Object result
protected boolean realtime
public DefaultServiceFetcher(IInternalAccess ia, boolean realtime)
public <T> IFuture<T> getService(RequiredServiceInfo info, RequiredServiceBinding bd, boolean rebind, IAsyncFilter<T> filter)
getService in interface IRequiredServiceFetcherinfo - The service info.rebind - Flag if should be rebound.public <T> ITerminableIntermediateFuture<T> getServices(RequiredServiceInfo info, RequiredServiceBinding bd, boolean rebind, IAsyncFilter<T> filter)
getServices in interface IRequiredServiceFetcherinfo - The service info.rebind - Flag if should be rebound.public <T> T getLastService()
getLastService in interface IRequiredServiceFetcherpublic <T> java.util.Collection<T> getLastServices()
getLastServices in interface IRequiredServiceFetcherprotected <T> IIntermediateFuture<T> checkResults(java.util.List<T> results, boolean rebind, RequiredServiceBinding bd)
protected <T> IFuture<T> checkResult(T result, boolean rebind, RequiredServiceBinding bd)
protected IFuture<IExternalAccess> getExternalAccessByName(IInternalAccess provider, RequiredServiceInfo info, RequiredServiceBinding binding)
protected IFuture<java.util.Collection<IExternalAccess>> getExternalAccessesByType(IInternalAccess provider, RequiredServiceInfo info, RequiredServiceBinding binding)
public IFuture<java.util.Collection<IExternalAccess>> getChildExternalAccesses(IComponentIdentifier cid, IInternalAccess provider, RequiredServiceInfo info, RequiredServiceBinding binding)
protected IFuture<IComponentIdentifier> createComponentIdentifier(IInternalAccess provider, java.lang.String name, IComponentIdentifier parent)
protected IFuture<IExternalAccess> getExternalAccess(IInternalAccess provider, IComponentIdentifier cid)
protected IFuture<IExternalAccess> getExternalAccess(IInternalAccess provider, java.lang.String name, IComponentIdentifier parent)
protected IFuture<IExternalAccess> createComponent(IInternalAccess provider, RequiredServiceInfo info, RequiredServiceBinding binding)
public java.util.Map<java.lang.String,java.lang.Object> getArguments(ComponentInstanceInfo component, java.lang.String[] imports, IValueFetcher fetcher, java.lang.ClassLoader cl)
public IFuture<IExternalAccess> getParentAccess(IInternalAccess provider, RequiredServiceInfo info, RequiredServiceBinding binding)
public <T> IFuture<T> createProxy(IService service, RequiredServiceInfo info, RequiredServiceBinding binding)