1. Event-Driven Design Pattern,IR(Interrupter) Pattern, Trigger Pattern
2. Don't call us, we call you.
3. Callback Pattern or Listener Pattern in the way of registerring
4. ThreadPool ExecutorService
5. Dispatch --> Handler--> Worker running in ThreadPool
public void run() { try { while (!Thread.interrupted()) { selector.select(); Set selected = selector.selectedKeys(); Iterator it = selected.iterator(); while (it.hasNext()) dispatch((SelectionKey) (it.next())); selected.clear(); } } catch (IOException ex) { /* ... */ } }