Context-Based Adaptation In Delay-Tolerant Networks