Handlers

A handler is a routine/function/method which is specialized in a certain type of data or focused on certain special tasks.

  • handler a very generic term.

Examples:

  • Event handler - Receives and digests events and signals from the surrounding system (e.g. OS or GUI).
  • Memory handler - Performs certain special tasks on memory.
  • File input handler - A function receiving file input and performing special tasks on the data, all depending on context of course.

Therefore, it is code that's associated with and triggered by the occurrence of a specific event, like an incoming message, a thrown exception, a signal sent to a process, a network I/O request completing, or a mouse click on a user interface element.