Kraken\Channel\Channel::handleReceiveResponse PHP Метод

handleReceiveResponse() защищенный Метод

protected handleReceiveResponse ( Kraken\Channel\Protocol\ProtocolInterface $protocol ) : boolean
$protocol Kraken\Channel\Protocol\ProtocolInterface
Результат boolean
    protected function handleReceiveResponse(ProtocolInterface $protocol)
    {
        $pid = $protocol->getPid();
        if (!$this->existsRequest($pid)) {
            return false;
        }
        $message = $protocol->getMessage();
        $exception = $protocol->getException();
        if ($exception === '') {
            $this->resolveRequest($pid, $message);
        } else {
            if ($exception === TaskIncompleteException::class) {
                $this->cancelRequest($pid, new ThrowableProxy([$exception, $message]));
            } else {
                $this->rejectRequest($pid, new ThrowableProxy([$exception, $message]));
            }
        }
        return true;
    }