Example usage for com.liferay.portal.kernel.util SubscriptionSender getMailId

List of usage examples for com.liferay.portal.kernel.util SubscriptionSender getMailId

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util SubscriptionSender getMailId.

Prototype

public String getMailId() 

Source Link

Usage

From source file:com.liferay.subscription.internal.messaging.SubscriptionSenderMessageListener.java

License:Open Source License

@Override
protected void doReceive(Message message) throws Exception {
    SubscriptionSender subscriptionSender = (SubscriptionSender) message.getPayload();

    StopWatch stopWatch = new StopWatch();

    stopWatch.start();/*  w ww  . j a v  a2s  .c om*/

    if (_log.isInfoEnabled()) {
        _log.info("Sending notifications for {mailId=" + subscriptionSender.getMailId() + "}");
    }

    subscriptionSender.flushNotifications();

    if (_log.isInfoEnabled()) {
        _log.info(StringBundler.concat("Sending notifications for {mailId=", subscriptionSender.getMailId(),
                "} completed in ", String.valueOf(stopWatch.getTime() / Time.SECOND), " seconds"));
    }
}