This code snippet for the interface SetObserver is taken from Effective Java (Avoid Excessive Synchronization Item 67)
public interface SetObser
A general requirement for an interface to be a "callback interface" is that the interface provides a way for the callee to invoke the code inside the caller. The main idea is that the caller has a piece of code that needs to be executed when something happens in the code of another component. Callback interfaces provide a way to pass this code to the component being called: the caller implements an interface, and the callee invokes one of its methods.
The callback mechanism may be implemented differently in different languages: C# has delegates and events in addition to callback interfaces, C has functions that can be passed by pointer, Objective C has delegate protocols, and so on. But the main idea is always the same: the caller passes a piece of code to be called upon occurrence of a certain event.