Package jadex.bridge.service
Interface IService
-
- All Known Subinterfaces:
IInternalService
- All Known Implementing Classes:
BasicService
,BDIAgentFactory
,BDIXComponentFactory
,BpmnFactory
,MicroAgentFactory
,MicroserviceFactory
public interface IService
The interface for platform services.
-
-
Field Summary
Fields Modifier and Type Field Description static IService[]
EMPTY_SERVICES
Empty service array.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IFuture<MethodInfo[]>
getMethodInfos()
Get reflective info about the service methods, args, return types.java.util.Map<java.lang.String,java.lang.Object>
getPropertyMap()
Get the map of properties (considered as constant).IServiceIdentifier
getServiceId()
Get the service identifier.IFuture<java.lang.Object>
invokeMethod(java.lang.String methodname, ClassInfo[] argtypes, java.lang.Object[] args, ClassInfo returntype)
todo: support also blackbox args (e.g.IFuture<java.lang.Boolean>
isValid()
Test if the service is valid.
-
-
-
Field Detail
-
EMPTY_SERVICES
static final IService[] EMPTY_SERVICES
Empty service array.
-
-
Method Detail
-
getServiceId
IServiceIdentifier getServiceId()
Get the service identifier.- Returns:
- The service identifier.
-
isValid
IFuture<java.lang.Boolean> isValid()
Test if the service is valid.- Returns:
- True, if service can be used.
-
getPropertyMap
java.util.Map<java.lang.String,java.lang.Object> getPropertyMap()
Get the map of properties (considered as constant).- Returns:
- The service property map (if any).
-
invokeMethod
IFuture<java.lang.Object> invokeMethod(java.lang.String methodname, ClassInfo[] argtypes, java.lang.Object[] args, ClassInfo returntype)
todo: support also blackbox args (e.g. byte[]) as args could also use classes that are not available. Invoke a method reflectively.- Parameters:
methodname
- The method name.argtypes
- The argument types (can be null if method exists only once).args
- The arguments.returntype
- The future return type if it is a specific future.- Returns:
- The result.
-
getMethodInfos
IFuture<MethodInfo[]> getMethodInfos()
Get reflective info about the service methods, args, return types.- Returns:
- The method infos.
-
-