Search in sources :

Example 1 with ViewLoadEventHandler

use of org.b3log.latke.plugin.ViewLoadEventHandler in project solo by b3log.

the class SoloServletListener method registerEventProcessor.

/**
     * Register event processors.
     */
private void registerEventProcessor() {
    Stopwatchs.start("Register Event Processors");
    LOGGER.debug("Registering event processors....");
    try {
        final EventManager eventManager = beanManager.getReference(EventManager.class);
        // Comment
        eventManager.registerListener(new ArticleCommentReplyNotifier());
        eventManager.registerListener(new PageCommentReplyNotifier());
        // Article
        // eventManager.registerListener(new AddArticleGoogleBlogSearchPinger());
        // eventManager.registerListener(new UpdateArticleGoogleBlogSearchPinger());
        // Plugin
        eventManager.registerListener(new PluginRefresher());
        eventManager.registerListener(new ViewLoadEventHandler());
        // Sync
        eventManager.registerListener(new ArticleSender());
        eventManager.registerListener(new ArticleUpdater());
        eventManager.registerListener(new CommentSender());
    } catch (final Exception e) {
        LOGGER.log(Level.ERROR, "Register event processors error", e);
        throw new IllegalStateException(e);
    }
    LOGGER.debug("Registering event processors....");
    Stopwatchs.end();
}
Also used : PluginRefresher(org.b3log.solo.event.plugin.PluginRefresher) ArticleUpdater(org.b3log.solo.event.rhythm.ArticleUpdater) EventManager(org.b3log.latke.event.EventManager) PageCommentReplyNotifier(org.b3log.solo.event.comment.PageCommentReplyNotifier) ArticleCommentReplyNotifier(org.b3log.solo.event.comment.ArticleCommentReplyNotifier) ArticleSender(org.b3log.solo.event.rhythm.ArticleSender) CommentSender(org.b3log.solo.event.symphony.CommentSender) ViewLoadEventHandler(org.b3log.latke.plugin.ViewLoadEventHandler)

Aggregations

EventManager (org.b3log.latke.event.EventManager)1 ViewLoadEventHandler (org.b3log.latke.plugin.ViewLoadEventHandler)1 ArticleCommentReplyNotifier (org.b3log.solo.event.comment.ArticleCommentReplyNotifier)1 PageCommentReplyNotifier (org.b3log.solo.event.comment.PageCommentReplyNotifier)1 PluginRefresher (org.b3log.solo.event.plugin.PluginRefresher)1 ArticleSender (org.b3log.solo.event.rhythm.ArticleSender)1 ArticleUpdater (org.b3log.solo.event.rhythm.ArticleUpdater)1 CommentSender (org.b3log.solo.event.symphony.CommentSender)1