Skip to main content

Posts

Showing posts with the label observer

Behavioral Patterns : Observer

Properties: -            When object state changes, lets interested parties know about the changes. -            As the name implies observers, observe the object in question for state changes. -            Observers need to register to the object for receiving notifications when state change occurs. Implementation: -            Observer  interface declares methods to get updates . -            Observable  interface declares methods to register, de-register for state changes. -            Concrete Observable  class implements the Observable interface and responsible for notifying oberservers about stage changes. Java Standard Library Implementations...