@header@
Blog Entry Listeners

Blog entry listeners are a type of Pebble plugin that allow you to write code that is called whenever a blog entry is added or removed. The following blog entry listeners are included with the Pebble distribution.

  • pebble.event.blogentry.EmailNotificationListener - sends a notification e-mail when a new blog entry is added.
  • pebble.event.blogentry.XmlRpcNotificationListener - sends an XML-RPC update notification ping when a blog entry is added.

To write your own listener, you need to write a Java class that implements the pebble.event.blogentry.BlogEntryListener interface as shown below. To gain access to the associated blog entry, simply use the getBlogEntry() method on the pebble.event.blogentry.BlogEntryEvent object that is passed to the callback methods.

  package pebble.event;

  /**
   * Implemented by classes wanting to be notified of blog entry events.
   *
   * @author Simon Brown
   */
  public interface BlogEntryListener {

    /**
     * Called when a blog entry has been added.
     *
     * @param event   a BlogEntryEvent instance
     */
    public void blogEntryAdded(BlogEntryEvent event);

    /**
     * Called when a blog entry has been removed.
     *
     * @param event   a BlogEntryEvent instance
     */
    public void blogEntryRemoved(BlogEntryEvent event);

  }

@footer@