Package jadex.noplatform.services
Class BaseService
- java.lang.Object
- 
- jadex.noplatform.services.BaseService
 
- 
- All Implemented Interfaces:
- IInternalService,- IService
 - Direct Known Subclasses:
- ClockService,- ExecutionService,- LibraryService
 
 public abstract class BaseService extends java.lang.Object implements IService, IInternalService Base implementation for no platform services.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IComponentIdentifiercidprotected IServiceIdentifiersid- 
Fields inherited from interface jadex.bridge.service.IServiceEMPTY_SERVICES
 
- 
 - 
Constructor SummaryConstructors Constructor Description BaseService(IComponentIdentifier cid, java.lang.Class<?> iface)Create a new base service.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IComponentIdentifiergetComponentId()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).IServiceIdentifiergetServiceId()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.IFuture<java.lang.Void>setComponentAccess(IInternalAccess access)Sets the access for the component.voidsetServiceIdentifier(IServiceIdentifier sid)Set the service identifier.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface jadex.bridge.service.IInternalServiceshutdownService, startService
 
- 
 
- 
- 
- 
Field Detail- 
cidprotected IComponentIdentifier cid 
 - 
sidprotected IServiceIdentifier sid 
 
- 
 - 
Constructor Detail- 
BaseServicepublic BaseService(IComponentIdentifier cid, java.lang.Class<?> iface) Create a new base service.
 
- 
 - 
Method Detail- 
getServiceIdpublic IServiceIdentifier getServiceId() Get the service identifier.- Specified by:
- getServiceIdin interface- IService
- Returns:
- The service identifier.
 
 - 
isValidpublic IFuture<java.lang.Boolean> isValid() Test if the service is valid.
 - 
getPropertyMappublic java.util.Map<java.lang.String,java.lang.Object> getPropertyMap() Get the map of properties (considered as constant).- Specified by:
- getPropertyMapin interface- IService
- Returns:
- The service property map (if any).
 
 - 
invokeMethodpublic 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.- Specified by:
- invokeMethodin interface- IService
- 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.
 
 - 
getMethodInfospublic IFuture<MethodInfo[]> getMethodInfos() Get reflective info about the service methods, args, return types.- Specified by:
- getMethodInfosin interface- IService
- Returns:
- The method infos.
 
 - 
getComponentIdpublic IComponentIdentifier getComponentId() - Returns:
- the cid
 
 - 
setComponentAccesspublic IFuture<java.lang.Void> setComponentAccess(IInternalAccess access) Description copied from interface:IInternalServiceSets the access for the component.- Specified by:
- setComponentAccessin interface- IInternalService
- Parameters:
- access- Component access.
 
 - 
setServiceIdentifierpublic void setServiceIdentifier(IServiceIdentifier sid) Description copied from interface:IInternalServiceSet the service identifier.- Specified by:
- setServiceIdentifierin interface- IInternalService
 
 
- 
 
-