anchor.diff:  
   == Notification Plugin Overview
   
  -Sometimes, you may need to perform some action based on what happens in Kill Bill. For example, you may need to send an email when an invoice is generated, or update SalesForce when an account is created. Creating your own custom notification plugin is the answer to such scenarios. Kill Bill notifies the notification plugin about events so that the plugin can take the appropriate action.  This article explains how you can go about creating your custom notification plugin. Such plugins can also be a great alternative to http://docs.killbill.io/latest/push_notifications.html[Push Notifications] in performance demanding environments.
  +Sometimes, you may need to perform some action based on what happens in Kill Bill. For example, you may need to send an email when an invoice is generated, or update SalesForce when an account is created. Creating your own custom notification plugin is the answer to such scenarios. Notification plugins listen to Kill Bill events and can take appropriate action.  This article explains how you can go about creating your custom notification plugin. Such plugins can also be a great alternative to http://docs.killbill.io/latest/push_notifications.html[Push Notifications] in performance demanding environments.
   
   
   == How to develop your custom notification plugin
   
  -We provide an interface called `OSGIKillbillEventDispatcher.OSGIKillbillEventHandler`. In order to create your own notification plugin, you need to write code that implements this interface and implement the `public void handleKillbillEvent(final ExtBusEvent killbillEvent)` method. 
  +We provide an interface called https://github.com/killbill/killbill-platform/blob/master/osgi-bundles/libs/killbill/src/main/java/org/killbill/billing/osgi/libs/killbill/OSGIKillbillEventDispatcher.java[OSGIKillbillEventDispatcher.OSGIKillbillEventHandler]. In order to create your own notification plugin, you need to write code that implements this interface and implement the `public void handleKillbillEvent(final ExtBusEvent killbillEvent)` method. 
   
   We also provide a simple https://github.com/killbill/killbill-hello-world-java-plugin[Hello World Plugin] that can be used as the starting point to develop your custom notification plugin. 
   You can refer to our https://docs.killbill.io/latest/plugin_development.html#_java_plugins[plugin development] document in order to understand how to set up the https://github.com/killbill/killbill-hello-world-java-plugin[Hello World Plugin] plugin code.
   
  -The https://github.com/killbill/killbill-hello-world-java-plugin[Hello World Plugin] has a class called `HelloWorldListener.java`. This implements the `OSGIKillbillEventDispatcher.OSGIKillbillEventHandler` interface . You can create a class similar to this and write your plugin code within the `handleKillbillEvent` method.
  +The https://github.com/killbill/killbill-hello-world-java-plugin[Hello World Plugin] has a class called https://github.com/killbill/killbill-hello-world-java-plugin/blob/master/src/main/java/org/killbill/billing/plugin/helloworld/HelloWorldListener.java[HelloWorldListener.java]. This implements the `OSGIKillbillEventDispatcher.OSGIKillbillEventHandler` interface . You can create a class similar to this and write your plugin code within the `handleKillbillEvent` method.
   
   Kill Bill provides a class called https://github.com/killbill/killbill-platform/blob/master/osgi-bundles/libs/killbill/src/main/java/org/killbill/billing/osgi/libs/killbill/OSGIKillbillAPI.java[OSGIKillBillAPI.java]. This class exposes all of Kill Bill's internal APIs. An object of this class will automatically be available in your plugin. For example, the `HelloWorldListener` declares a field corresponding to `osgiKillbillAPI` at Line 36 which is intialized via the constructor.
   
  
positive.code: |ACCOUNT_CHANGE
  |Occurs when a customer account is modified
  |BLOCKING_STATE
  |Occurs when there is a change in state of an entitlement (It becomes BLOCKED or UNBLOCKED)
  |BROADCAST_SERVICE
  |Used to broadcast an event to other Kill Bill nodes (Typically used for plugin related events like plugin installation,plugin uninstallation, plugin start, plugin stop, etc. )
  |SUBSCRIPTION_CREATION
  
negative.code: |INVOICE_NOTIFICATION
  |Occurs when an invoice is going to be generated for an account in the future (Can be used to notify customers about upcoming bills)
  |INVOICE_PAYMENT_SUCCESS
  |Occurs when an invoice payment is successful
  |INVOICE_PAYMENT_FAILED
  |Occurs when an invoice payment fails
  |PAYMENT_SUCCESS
  |Occurs when payment is successful
  |PAYMENT_FAILED
  