Class BaseService

    • Constructor Detail

      • BaseService

        public BaseService​(IComponentIdentifier cid,
                           java.lang.Class<?> iface)
        Create a new base service.
    • Method Detail

      • isValid

        public IFuture<java.lang.Boolean> isValid()
        Test if the service is valid.
        Specified by:
        isValid in interface IService
        Returns:
        True, if service can be used.
      • getPropertyMap

        public java.util.Map<java.lang.String,​java.lang.Object> getPropertyMap()
        Get the map of properties (considered as constant).
        Specified by:
        getPropertyMap in interface IService
        Returns:
        The service property map (if any).
      • invokeMethod

        public 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:
        invokeMethod in 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.
      • getMethodInfos

        public IFuture<MethodInfo[]> getMethodInfos()
        Get reflective info about the service methods, args, return types.
        Specified by:
        getMethodInfos in interface IService
        Returns:
        The method infos.