public function process(PayloadInterface $payload, ResponseGenerator $generator)
    {
        $typeMap = $generator->checkContentResponseType();

        $availableTypes = array_keys($typeMap);

        $type = $this->determineResponseType($availableTypes);

        // If we don't get a valid type back, let's force one, per the HTTP 1.1 spec.
        if (!$type) {
            $type = array_shift($availableTypes);
        }

        $methodToCall = $typeMap[$type];
        $response = $generator->$methodToCall($payload);
        $this->sendResponse($response);
    }