From the course: Spring: Design Patterns
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
The Adapter pattern
[Instructor] The Adapter Pattern is one of those patterns that really takes a moment to wrap your mind around and it becomes even harder to find objects that fit in to this pattern when you try to create them at will because we tend to think of things that are similar, but very similar, not loosely similar. And the Adapter Pattern plays very well in that loosely similar set. Let's talk a little bit about how the Adapter Pattern is used in Spring. One if the most common use case or the one that I've dealt with the most is with Spring integration. Spring integration actually leverages Channel Adapters throughout the entire operation for communication with different systems. It allows you to build a channel and within that channel that have different communication in points without having to manipulate the behavior of the channel. So in Spring integration this is a great example of very similar but not that similar objects having shared methodology. It's also used a lot with the internal…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.