Adapter Design Pattern

Adapter design pattern is one of the structural design pattern and its used so that two unrelated interfaces can work together. The object that joins these unrelated interface is called an Adapter.

  1. Class Adapter – This form uses Java Inheritance and extends the source interface, in our case Socket class.
  2. Object Adapter – This form uses Java Composition and adapter contains the source object.

Leave a comment