Package jadex.requiredservice
Interface IRequiredServiceFeature
- All Known Implementing Classes:
RequiredServiceFeature
public interface IRequiredServiceFeature
-
Method Summary
Modifier and TypeMethodDescription<T> jadex.future.ISubscriptionIntermediateFuture
<T> addQuery
(jadex.providedservice.impl.search.ServiceQuery<T> query) Add a query for a declared required service.<T> jadex.future.ISubscriptionIntermediateFuture
<T> addQuery
(jadex.providedservice.impl.search.ServiceQuery<T> query, long timeout) Add a query for a declared required service.<T> jadex.future.ISubscriptionIntermediateFuture
<T> Add a query for a declared required service.<T> jadex.future.ISubscriptionIntermediateFuture
<T> Add a query for a declared required service.<T> T
getLocalService
(jadex.providedservice.impl.search.ServiceQuery<T> query) Lookup matching services and provide first result.<T> T
getLocalService
(Class<T> type) Resolve a declared required service of a given type.<T> T
getLocalService
(String name) Resolve a declared required service of a given name.<T> T
getLocalService0
(Class<T> type) Resolve a declared required service of a given type.<T> Collection
<T> getLocalServices
(jadex.providedservice.impl.search.ServiceQuery<T> query) Lookup all matching services.<T> Collection
<T> getLocalServices
(Class<T> type) Resolve a declared required services of a given type.<T> Collection
<T> getLocalServices
(String name) Resolve a declared required services of a given name.<T> jadex.future.IFuture
<T> getService
(Class<T> type) Resolve a declared required service of a given type.<T> jadex.future.IFuture
<T> getService
(String name) Resolve a declared required service of a given name.getServiceInfo
(String name) Get the required service info for a name.jadex.providedservice.IService
getServiceProxy
(jadex.providedservice.IServiceIdentifier sid, RequiredServiceInfo info) Create the user-facing object from the received search or query result.jadex.providedservice.impl.search.ServiceQuery
<?> getServiceQuery
(String name) Get a service query for a required service info (as defined in the agent under that name).<T> jadex.future.ITerminableIntermediateFuture
<T> getServices
(Class<T> type) Resolve a declared required services of a given type.<T> jadex.future.ITerminableIntermediateFuture
<T> getServices
(String name) Resolve a declared required services of a given name.<T> jadex.future.IFuture
<T> searchService
(jadex.providedservice.impl.search.ServiceQuery<T> query) Search for matching services and provide first result.<T> jadex.future.IFuture
<T> searchService
(jadex.providedservice.impl.search.ServiceQuery<T> query, long timeout) Performs a sustained search for a service.<T> jadex.future.ITerminableIntermediateFuture
<T> searchServices
(jadex.providedservice.impl.search.ServiceQuery<T> query) Search for all matching services.
-
Method Details
-
getLocalService
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
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
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
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
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.
-
getLocalService
<T> T getLocalService(jadex.providedservice.impl.search.ServiceQuery<T> query) Lookup 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.
-
getLocalServices
Lookup all matching services. Synchronous method only for locally available services.- Parameters:
query
- The search query.- Returns:
- A collection of services.
-
searchService
<T> jadex.future.IFuture<T> searchService(jadex.providedservice.impl.search.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.
-
searchService
<T> jadex.future.IFuture<T> searchService(jadex.providedservice.impl.search.ServiceQuery<T> query) Search for matching services and provide first result.- Parameters:
query
- The search query.- Returns:
- Future providing the corresponding service or ServiceNotFoundException when not found.
-
searchServices
<T> jadex.future.ITerminableIntermediateFuture<T> searchServices(jadex.providedservice.impl.search.ServiceQuery<T> query) Search for all matching services.- Parameters:
query
- The search query.- Returns:
- Each service as an intermediate result or a collection of services as final result.
-
addQuery
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> jadex.future.ISubscriptionIntermediateFuture<T> addQuery(jadex.providedservice.impl.search.ServiceQuery<T> query) 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> jadex.future.ISubscriptionIntermediateFuture<T> addQuery(jadex.providedservice.impl.search.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
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
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
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
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
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
jadex.providedservice.IService getServiceProxy(jadex.providedservice.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 service (with or without required proxy). -
getServiceQuery
Get a service query for a required service info (as defined in the agent under that name).- Parameters:
name
- The name.- Returns:
- The service query.
-
getServiceInfo
Get the required service info for a name.- Parameters:
name
- The required service name.
-