Itinerary
Problem: How do you encapsulate an itinerary?
Context: You are concerned with routing agents among multiple destinations.
Solution:
- An Itinerary maintains a list of destinations and defines how to navigate them.
- The agent dispatches itself by asking the Itinerary to go to the next destination.
- An Itinerary handles exceptions, e.g. if a host is unknown or does not respond.