public boolean term_endpoint(String addr_) {

        if (ctx_terminated) {
            ZError.errno(ZError.ETERM);
            return false;
        }
        
        //  Check whether endpoint address passed to the function is valid.
        if (addr_ == null) {
            throw new IllegalArgumentException();
        }

        //  Process pending commands, if any, since there could be pending unprocessed process_own()'s
        //  (from launch_child() for example) we're asked to terminate now.
        boolean rc = process_commands (0, false);
        if (!rc)
            return rc;

        if (!endpoints.containsKey(addr_)) {
            return false;
        }
        //  Find the endpoints range (if any) corresponding to the addr_ string.
        Iterator<Entry<String, Own>> it = endpoints.entrySet().iterator();

        while(it.hasNext()) {
            Entry<String, Own> e = it.next();
            term_child(e.getValue());
            it.remove();
        }
        return true;

    }