public function deserialize($inputChannel)
    {
        $document = stream_get_contents($inputChannel);

        $environmentInfo = Utilities::unserialize($document);

        $configurationSettings = $this->_translateConfigurationSettings(
            $environmentInfo
        );

        $localResources = $this->_translateLocalResources($environmentInfo);
        $currentInstance = $this->_translateCurrentInstance($environmentInfo);
        $roles = $this->_translateRoles(
            $environmentInfo,
            $currentInstance,
            $environmentInfo['CurrentInstance']['@attributes']['roleName']
        );

        return new RoleEnvironmentData(
            $environmentInfo['Deployment']['@attributes']['id'],
            $configurationSettings,
            $localResources,
            $currentInstance,
            $roles,
            ($environmentInfo['Deployment']['@attributes']['emulated'] == 'true')
        );
    }