Have you checked the K2 blackpearl documentation ?
K2 blackpearl developper Reference >> Extending the K2 Platform >> How to register new events with the Event Bus
and K2 blackpearl developper Reference >> Extending the K2 Platform >> How to add a 3rd-party event recorder to the K2 blackpearl Server
Otherwise, theire is a good chapter on the subject on the K2 book (chapter 21)... and you can find a implementation sample on the blackmarket (Custom Event Notification for OCS)