What is a handler

tji picture tji · Oct 12, 2008 · Viewed 51.7k times · Source

Hi I am trying to learn some programing related terms, and I often comes over the word handler. Can anyone pleas explain what handler means and when to use the term.

Answer

sharkin picture sharkin · Oct 12, 2008

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

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.