Example usage for com.liferay.portal.poller PollerProcessorUtil addPollerProcessor

List of usage examples for com.liferay.portal.poller PollerProcessorUtil addPollerProcessor

Introduction

In this page you can find the example usage for com.liferay.portal.poller PollerProcessorUtil addPollerProcessor.

Prototype

public static void addPollerProcessor(String portletId, PollerProcessor pollerProcessor) 

Source Link

Usage

From source file:com.liferay.portlet.PortletBagFactory.java

License:Open Source License

protected PollerProcessor newPollerProcessor(Portlet portlet) throws Exception {

    if (Validator.isNull(portlet.getPollerProcessorClass())) {
        return null;
    }/*from  w ww. j  a  va 2 s. c  o  m*/

    PollerProcessor pollerProcessorInstance = (PollerProcessor) newInstance(PollerProcessor.class,
            portlet.getPollerProcessorClass());

    PollerProcessorUtil.addPollerProcessor(portlet.getPortletId(),
            new ShardPollerProcessorWrapper(pollerProcessorInstance));

    return pollerProcessorInstance;
}