/** * Get all declared services of the given provider. * @return The corresponding services. */ public static <T> IFuture<T> getDeclaredService(IServiceProvider provider, Class<T> type) { return SServiceProvider.getService(provider, type, RequiredServiceInfo.SCOPE_LOCAL); }
/** * Get one service of a type. // * (Returns required service proxy). * @param type The class. * @return The corresponding service. */ public static <T> IFuture<T> getService(IInternalAccess component, Class<T> type, String scope, boolean proxy) { return getService(component, type, scope, (IAsyncFilter<T>)null, proxy); }
/** * Get one service of a type. // * (Returns required service proxy). * @param type The class. * @return The corresponding service. */ public static <T> IFuture<T> getService(IInternalAccess component, ClassInfo type) { return getService(component, type, null, true); }
/** * Get all declared services of the given provider. * @return The corresponding services. */ public static <T> IFuture<T> getDeclaredService(IInternalAccess component, ClassInfo type) { return getService(component, type, RequiredServiceInfo.SCOPE_LOCAL, true); }
/** * Get a service from a specific component. * @param component The component. * @param cid The target component identifier. * @param type The service type. * @return The corresponding service. */ public static <T> IFuture<T> getService(final IInternalAccess component, final IComponentIdentifier cid, final ClassInfo type, final boolean proxy) { return getService(component, cid, RequiredServiceInfo.SCOPE_LOCAL, type, proxy); }
/** * Get one service of a type. // * (Returns required service proxy). * @param type The class. * @return The corresponding service. */ public static <T> IFuture<T> getService(IInternalAccess component, Class<T> type, boolean proxy) { return getService(component, type, null, proxy); }
/** * Get a service from a specific component. // * (Returns required service proxy). * @param component The component. * @param cid The target component identifier. * @param type The service type. * @return The corresponding service. */ public static <T> IFuture<T> getService(final IInternalAccess component, final IComponentIdentifier cid, final Class<T> type, final boolean proxy) { return getService(component, cid, RequiredServiceInfo.SCOPE_LOCAL, type, proxy); }
/** * Get one service of a type. // * (Returns required service proxy). * @param type The class. * @return The corresponding service. */ public static <T> IFuture<T> getService(IInternalAccess component, ClassInfo type, String scope) { return getService(component, type, scope, (IAsyncFilter<T>)null, true); }
/** * Get one service of a type. * @param type The class. * @return The corresponding service. */ public static <T> IFuture<T> getService(IExternalAccess provider, ClassInfo type, String scope) { return getService(provider, type, scope, (IAsyncFilter<T>)null); }
/** * Get one service of a type and only search upwards (parents). * @param type The class. * @return The corresponding service. */ public static <T> IFuture<T> getServiceUpwards(IServiceProvider provider, Class<T> type) { return getService(provider, type, RequiredServiceInfo.SCOPE_UPWARDS); }
/** * Get one service of a type. // * (Returns required service proxy). * @param type The class. * @return The corresponding service. */ public static <T> IFuture<T> getService(IInternalAccess component, Class<T> type) { return getService(component, type, null, true); }
/** * Get one service of a type. // * (Returns required service proxy). * @param type The class. * @return The corresponding service. */ public static <T> IFuture<T> getService(final IInternalAccess component, final Class<T> type, final String scope, final IAsyncFilter<T> filter) { return getService(component, type, scope, filter, true); }
/** * Get one service with id. // * (Returns required service proxy). * @param clazz The class. * @return The corresponding service. */ public static <T> IFuture<T> getService(final IInternalAccess component, final IServiceIdentifier sid) { return getService(component, sid, true); }
/** * Get all declared services of the given provider. * @return The corresponding services. */ public static <T> IFuture<T> getDeclaredService(IExternalAccess provider, Class<T> type) { return getService(provider, type, RequiredServiceInfo.SCOPE_LOCAL); }
/** * Get one service of a type. // * (Returns required service proxy). * @param type The class. * @return The corresponding service. */ public static <T> IFuture<T> getService(final IInternalAccess component, final ClassInfo type, final String scope, final IAsyncFilter<T> filter) { return getService(component, type, scope, filter, true); }
/** * Get one service of a type. * @param type The class. * @return The corresponding service. */ public static <T> IFuture<T> getService(IInternalAccess component, ClassInfo type, boolean proxy) { return getService(component, type, null, proxy); }
@Classname("getService(IExternalAccess provider, final IComponentIdentifier cid, final Class<T> type)") public IFuture<T> execute(IInternalAccess ia) { return getService(ia, cid, type, false); } });
/** * Get the local CMS. * @return The local CMS. */ public IFuture<IComponentManagementService> getLocalCMS() { IFuture<IComponentManagementService> ret = SServiceProvider.getService(access.getServiceProvider(), IComponentManagementService.class, RequiredServiceInfo.SCOPE_PLATFORM); return ret; }
@Classname("getService(IExternalAccess provider, final IServiceIdentifier sid)") public IFuture<T> execute(IInternalAccess ia) { return getService(ia, sid, false); } });
/** * 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)); }