That which is called when a particular thing happens. It waits, and then it answers.
Agent noun from Old English handlian (to handle) with the -er suffix; that which waits for a particular thing to happen, and then answers it.
Nothing happens until it is called and nothing lingers once it has answered: a handler exists entirely inside the gap between an event and a response.