What is Java listener?