/** * Find service by type and tags. Service must have all the tags. * @param component The component. * @param type The service type. * @param scope The search scope. * @param tags The tags. * @return A matching service */ public static <T> IFuture<T> getTaggedService(final IInternalAccess component, ClassInfo type, String scope, final String... tags) { return getService(component, type, scope, new TagFilter<T>(component.getExternalAccess(), tags)); }
/** * Get a required service using tags. * @param name The required service name. * @param rebind If false caches results. * @param tags The service tags. * @return The service. */ public <T> IFuture<T> getRequiredService(String name, boolean rebind, String... tags) { return getRequiredService(name, rebind, new TagFilter<T>(component.getExternalAccess(), tags)); }
/** * Find service by type and tags. Service must have all the tags. * @param component The component. * @param type The service type. * @param scope The search scope. * @param tags The tags. * @return A matching service */ public static <T> IFuture<T> getTaggedService(final IInternalAccess component, Class<T> type, String scope, final String... tags) { return getService(component, type, scope, new TagFilter<T>(component.getExternalAccess(), tags)); }
/** * Get a required services using tags. * @param name The required service name. * @param rebind If false caches results. * @param tags The service tags. * @return Each service as an intermediate result and a collection of services as final result. */ public <T> ITerminableIntermediateFuture<T> getRequiredServices(String name, boolean rebind, String... tags) { return getRequiredServices(name, rebind, new TagFilter<T>(component.getExternalAccess(), tags)); }
/** * Find services by type and tags. Service must have all the tags. * @param component The component. * @param type The service type. * @param scope The search scope. * @param tags The tags. * @return A matching service */ public static <T> ITerminableIntermediateFuture<T> getTaggedServices(final IInternalAccess component, Class<T> type, String scope, final String... tags) { return getServices(component, type, scope, new TagFilter<T>(component.getExternalAccess(), tags)); }
/** * Find services by type and tags. Service must have all the tags. * @param component The component. * @param type The service type. * @param scope The search scope. * @param tags The tags. * @return A matching service */ public static <T> ITerminableIntermediateFuture<T> getTaggedServices(final IInternalAccess component, ClassInfo type, String scope, final String... tags) { return getServices(component, type, scope, new TagFilter<T>(component.getExternalAccess(), tags)); }
public IFuture<IServiceCallService> execute(Void args) { // return agent.getComponentFeature(IRequiredServicesFeature.class).getRequiredService(servicename); return agent.getComponentFeature(IRequiredServicesFeature.class).getRequiredService(servicename, true, new TagFilter<IServiceCallService>(agent.getExternalAccess(), tag)); } }, 7, 1500);
TagFilter<T> tf = new TagFilter<T>(ia.getExternalAccess(), info.getTags()); if(filter==null)
TagFilter<T> tf = new TagFilter<T>(ia.getExternalAccess(), info.getTags()); if(filter==null)
TagFilter<Object> tagfil = info.getTags()==null || info.getTags().size()==0? null: new TagFilter<Object>(component.getExternalAccess(), info.getTags()); ISubscriptionIntermediateFuture<Object> sfut = SServiceProvider.addQuery(getComponent(), (Class<Object>)info.getType().getType(getComponent().getClassLoader()), info.getDefaultBinding().getScope(), tagfil);