Example usage for com.liferay.portal.kernel.scheduler TriggerFactoryUtil createTrigger

List of usage examples for com.liferay.portal.kernel.scheduler TriggerFactoryUtil createTrigger

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.scheduler TriggerFactoryUtil createTrigger.

Prototype

public static Trigger createTrigger(String jobName, String groupName, int interval, TimeUnit timeUnit) 

Source Link

Usage

From source file:ca.efendi.datafeeds.messaging.FtpSubscriptionMessageListener.java

License:Apache License

@Activate
@Modified//ww w  .  j av a  2  s  .c om
protected void activate(Map<String, Object> properties) {
    _ftpSubscriptionConfiguration = ConfigurableUtil.createConfigurable(FtpSubscriptionConfiguration.class,
            properties);

    schedulerEntryImpl
            .setTrigger(TriggerFactoryUtil.createTrigger(getEventListenerClass(), getEventListenerClass(),
                    //_ftpSubscriptionConfiguration.entryCheckInterval(),
                    1, TimeUnit.MINUTE));

    _schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);

    // deactivate();
}

From source file:com.liferay.blade.samples.schedulerentry.BladeSchedulerEntryMessageListener.java

License:Apache License

@Activate
@Modified// w w w . ja v  a  2  s.  c  om
protected void activate() {
    schedulerEntryImpl.setTrigger(TriggerFactoryUtil.createTrigger(getEventListenerClass(),
            getEventListenerClass(), 15, TimeUnit.MINUTE));

    _schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}

From source file:com.liferay.blogs.web.internal.messaging.CheckEntryMessageListener.java

License:Open Source License

@Activate
@Modified//from w  w w  .  ja  v a  2  s  . c o m
protected void activate(Map<String, Object> properties) {
    _blogsConfiguration = ConfigurableUtil.createConfigurable(BlogsConfiguration.class, properties);

    schedulerEntryImpl.setTrigger(TriggerFactoryUtil.createTrigger(getEventListenerClass(),
            getEventListenerClass(), _blogsConfiguration.entryCheckInterval(), TimeUnit.MINUTE));

    _schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}

From source file:com.liferay.blogs.web.internal.messaging.LinkbackMessageListener.java

License:Open Source License

@Activate
@Modified//from w ww  .ja  v  a  2s.  co m
protected void activate(Map<String, Object> properties) {
    _blogsConfiguration = ConfigurableUtil.createConfigurable(BlogsConfiguration.class, properties);

    schedulerEntryImpl.setTrigger(TriggerFactoryUtil.createTrigger(getEventListenerClass(),
            getEventListenerClass(), _blogsConfiguration.linkbackJobInterval(), TimeUnit.MINUTE));

    _schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}

From source file:com.liferay.message.boards.web.internal.messaging.ExpireBanMessageListener.java

License:Open Source License

@Activate
@Modified/*from  w w  w .j a  v  a  2s .  com*/
protected void activate(Map<String, Object> properties) {
    _mbConfiguration = ConfigurableUtil.createConfigurable(MBConfiguration.class, properties);

    schedulerEntryImpl.setTrigger(TriggerFactoryUtil.createTrigger(getEventListenerClass(),
            getEventListenerClass(), _mbConfiguration.expireBanJobInterval(), TimeUnit.MINUTE));

    _schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}