Interface IRequiredServicesFeature

    • Method Detail

      • getLocalService

        <T> T getLocalService​(java.lang.String name)
        Resolve a declared required service of a given name. Synchronous method only for locally available services.
        Parameters:
        name - The service name.
        Returns:
        The service or ServiceNotFoundException
      • getLocalService

        <T> T getLocalService​(java.lang.Class<T> type)
        Resolve a declared required service of a given type. Synchronous method only for locally available services.
        Parameters:
        type - The service type.
        Returns:
        The service or ServiceNotFoundException.
      • getLocalService0

        <T> T getLocalService0​(java.lang.Class<T> type)
        Resolve a declared required service of a given type. Synchronous method only for locally available services.
        Parameters:
        type - The service type.
        Returns:
        The service or null.
      • getLocalServices

        <T> java.util.Collection<T> getLocalServices​(java.lang.String name)
        Resolve a declared required services of a given name. Synchronous method only for locally available services.
        Parameters:
        name - The services name.
        Returns:
        A collection of services.
      • getLocalServices

        <T> java.util.Collection<T> getLocalServices​(java.lang.Class<T> type)
        Resolve a declared required services of a given type. Synchronous method only for locally available services.
        Parameters:
        type - The services type.
        Returns:
        A collection of services.
      • searchLocalService

        <T> T searchLocalService​(ServiceQuery<T> query)
        Search for matching services and provide first result. Synchronous method only for locally available services.
        Parameters:
        query - The search query.
        Returns:
        The corresponding service or ServiceNotFoundException when not found.
      • searchLocalServices

        <T> java.util.Collection<T> searchLocalServices​(ServiceQuery<T> query)
        Search for all matching services. Synchronous method only for locally available services.
        Parameters:
        query - The search query.
        Returns:
        A collection of services.
      • searchService

        <T> IFuture<T> searchService​(ServiceQuery<T> query,
                                     long timeout)
        Performs a sustained search for a service. Attempts to find a service for a maximum duration until timeout occurs.
        Parameters:
        query - The search query.
        timeout - Maximum time period to search, 0 for default timeout, -1 for no wait.
        Returns:
        Service matching the query, exception if service is not found.
      • addQuery

        <T> ISubscriptionIntermediateFuture<T> addQuery​(java.lang.String name)
        Add a query for a declared required service. Continuously searches for matching services.
        Parameters:
        name - The name of the required service declaration.
        Returns:
        Future providing the corresponding services as intermediate results.
      • addQuery

        <T> ISubscriptionIntermediateFuture<T> addQuery​(ServiceQuery<T> query,
                                                        long timeout)
        Add a query for a declared required service. Continuously searches for matching services.
        Parameters:
        name - The name of the required service declaration.
        Returns:
        Future providing the corresponding services as intermediate results.
      • addQuery

        <T> ISubscriptionIntermediateFuture<T> addQuery​(java.lang.Class<T> type)
        Add a query for a declared required service. Continuously searches for matching services.
        Parameters:
        type - The type of the required service declaration.
        Returns:
        Future providing the corresponding services as intermediate results.
      • getService

        <T> IFuture<T> getService​(java.lang.String name)
        Resolve a declared required service of a given name. Asynchronous method for locally as well as remotely available services.
        Parameters:
        name - The service name.
        Returns:
        Future with the service or ServiceNotFoundException
      • getService

        <T> IFuture<T> getService​(java.lang.Class<T> type)
        Resolve a declared required service of a given type. Asynchronous method for locally as well as remotely available services.
        Parameters:
        type - The service type.
        Returns:
        Future with the service or ServiceNotFoundException
      • getServices

        <T> ITerminableIntermediateFuture<T> getServices​(java.lang.String name)
        Resolve a declared required services of a given name. Asynchronous method for locally as well as remotely available services.
        Parameters:
        name - The services name.
        Returns:
        Each service as an intermediate result or a collection of services as final result.
      • getServices

        <T> ITerminableIntermediateFuture<T> getServices​(java.lang.Class<T> type)
        Resolve a declared required services of a given type. Asynchronous method for locally as well as remotely available services.
        Parameters:
        type - The services type.
        Returns:
        Each service as an intermediate result or a collection of services as final result.
      • getServiceProxy

        IService getServiceProxy​(IServiceIdentifier sid,
                                 RequiredServiceInfo info)
        Create the user-facing object from the received search or query result. Result may be service object, service identifier (local or remote), or event. User object is either event or service (with or without required proxy).