Package jadex.bridge.service.component
Interface IRequiredServicesFeature
-
- All Superinterfaces:
IExternalComponentFeature
,IExternalRequiredServicesFeature
- All Known Subinterfaces:
IBDIAgent
,IInternalAccess
- All Known Implementing Classes:
ComponentPlanBDI
,HelloWorldBDI
,HelloWorldPlan2
,IndexChangeBDI
,InterfaceInjectionBDI
,PlanMethodInjectionBDI
,PlanReasonInjectionBDI
,RequiredServicesComponentFeature
,RequiredServicesFeatureAdapter
,SayHelloBDI
public interface IRequiredServicesFeature extends IExternalRequiredServicesFeature
Component feature for required services.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> ISubscriptionIntermediateFuture<T>
addQuery(ServiceQuery<T> query, long timeout)
Add a query for a declared required service.<T> ISubscriptionIntermediateFuture<T>
addQuery(java.lang.Class<T> type)
Add a query for a declared required service.<T> ISubscriptionIntermediateFuture<T>
addQuery(java.lang.String name)
Add a query for a declared required service.<T> T
getLocalService(java.lang.Class<T> type)
Resolve a declared required service of a given type.<T> T
getLocalService(java.lang.String name)
Resolve a declared required service of a given name.<T> T
getLocalService0(java.lang.Class<T> type)
Resolve a declared required service of a given type.<T> java.util.Collection<T>
getLocalServices(java.lang.Class<T> type)
Resolve a declared required services of a given type.<T> java.util.Collection<T>
getLocalServices(java.lang.String name)
Resolve a declared required services of a given name.<T> IFuture<T>
getService(java.lang.Class<T> type)
Resolve a declared required service of a given type.<T> IFuture<T>
getService(java.lang.String name)
Resolve a declared required service of a given name.<T> ITerminableIntermediateFuture<T>
getServices(java.lang.Class<T> type)
Resolve a declared required services of a given type.<T> ITerminableIntermediateFuture<T>
getServices(java.lang.String name)
Resolve a declared required services of a given name.<T> T
searchLocalService(ServiceQuery<T> query)
Search for matching services and provide first result.<T> java.util.Collection<T>
searchLocalServices(ServiceQuery<T> query)
Search for all matching services.<T> IFuture<T>
searchService(ServiceQuery<T> query, long timeout)
Performs a sustained search for a service.-
Methods inherited from interface jadex.bridge.service.component.IExternalRequiredServicesFeature
addQuery, searchService, searchServices
-
-
-
-
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.
-
-