def allocate(self):
        """Builds the context and the Hooks."""
        self.logger.debug("Allocating environment.")
        self._allocate()
        self.logger.debug("Environment successfully allocated.")