Package jadex.bridge.service
Interface IService
-
- All Known Subinterfaces:
IInternalService
- All Known Implementing Classes:
BasicService
,SharedClockService
,SharedExecutionService
,SharedService
,SharedSimulationService
,SharedThreadPoolService
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 jadex.commons.future.IFuture<jadex.commons.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.jadex.commons.future.IFuture<java.lang.Object>
invokeMethod(java.lang.String methodname, jadex.bridge.ClassInfo[] argtypes, java.lang.Object[] args, jadex.bridge.ClassInfo returntype)
todo: support also blackbox args (e.g.jadex.commons.future.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
jadex.commons.future.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
jadex.commons.future.IFuture<java.lang.Object> invokeMethod(java.lang.String methodname, jadex.bridge.ClassInfo[] argtypes, java.lang.Object[] args, jadex.bridge.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
jadex.commons.future.IFuture<jadex.commons.MethodInfo[]> getMethodInfos()
Get reflective info about the service methods, args, return types.- Returns:
- The method infos.
-
-