@header@
Comment Listeners |
Comment listeners are a type of Pebble plugin that allow you to write code that is called whenever a comment is added or removed. The following comment listeners are included with the Pebble distribution.
To write your own listener, you need to write a Java class that implements the pebble.event.comment.CommentListener interface
as shown below. To gain access to the associated comment, simply use the package pebble.event; /** * Implemented by classes wanting to be notified of comment events. * * @author Simon Brown */ public interface CommentListener { /** * Called when a comment has been added. * * @param event a CommentEvent instance */ public void commentAdded(CommentEvent event); /** * Called when a comment has been removed. * * @param event a CommentEvent instance */ public void commentRemoved(CommentEvent event); } |