The Theory of Optimal Announcements