Example usage for com.liferay.portal.kernel.messaging DestinationNames SCHEDULER_DISPATCH

List of usage examples for com.liferay.portal.kernel.messaging DestinationNames SCHEDULER_DISPATCH

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.messaging DestinationNames SCHEDULER_DISPATCH.

Prototype

String SCHEDULER_DISPATCH

To view the source code for com.liferay.portal.kernel.messaging DestinationNames SCHEDULER_DISPATCH.

Click Source Link

Usage

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

License:Apache License

@Activate
@Modified// ww w .j  a  v  a2s.c o m
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.announcements.web.internal.messaging.CheckEntryMessageListener.java

License:Open Source License

@Activate
protected void activate() {
    Class<?> clazz = getClass();

    String className = clazz.getName();

    Trigger trigger = _triggerFactory.createTrigger(className, className, null, null,
            PropsValues.ANNOUNCEMENTS_ENTRY_CHECK_INTERVAL, TimeUnit.MINUTE);

    SchedulerEntry schedulerEntry = new SchedulerEntryImpl(className, trigger);

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

From source file:com.liferay.asset.publisher.web.internal.messaging.CheckAssetEntryMessageListener.java

License:Open Source License

@Activate
protected void activate(Map<String, Object> properties) {
    AssetPublisherWebConfiguration assetPublisherWebConfiguration = ConfigurableUtil
            .createConfigurable(AssetPublisherWebConfiguration.class, properties);

    Class<?> clazz = getClass();

    String className = clazz.getName();

    Trigger trigger = _triggerFactory.createTrigger(className, className, null, null,
            assetPublisherWebConfiguration.checkInterval(), TimeUnit.HOUR);

    SchedulerEntry schedulerEntry = new SchedulerEntryImpl(className, trigger);

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

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

License:Apache License

@Activate
@Modified//from  ww  w  .  j av  a  2s  .c o  m
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  ww . j a va 2  s .co  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   ww  w  .j a va2  s  . c  o  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.calendar.web.internal.messaging.CheckBookingsMessageListener.java

License:Open Source License

@Activate
protected void activate() {
    Class<?> clazz = getClass();

    String className = clazz.getName();

    Trigger trigger = _triggerFactory.createTrigger(className, className, null, null,
            CalendarServiceConfigurationValues.CALENDAR_NOTIFICATION_CHECK_INTERVAL, TimeUnit.MINUTE);

    SchedulerEntry schedulerEntry = new SchedulerEntryImpl(className, trigger);

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

From source file:com.liferay.document.library.web.internal.messaging.TempFileEntriesMessageListener.java

License:Open Source License

@Activate
@Modified/*from   w w  w .  j ava 2 s  . c o  m*/
protected void activate(Map<String, Object> properties) {
    _dlConfiguration = ConfigurableUtil.createConfigurable(DLConfiguration.class, properties);

    Class<?> clazz = getClass();

    String className = clazz.getName();

    Trigger trigger = _triggerFactory.createTrigger(className, className, null, null,
            _dlConfiguration.temporaryFileEntriesCheckInterval(), TimeUnit.HOUR);

    SchedulerEntry schedulerEntry = new SchedulerEntryImpl(className, trigger);

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

From source file:com.liferay.exportimport.internal.messaging.CheckSystemEventMessageListener.java

License:Open Source License

@Activate
protected void activate() {
    Class<?> clazz = getClass();

    String className = clazz.getName();

    Trigger trigger = _triggerFactory.createTrigger(className, className, null, null,
            PropsValues.STAGING_SYSTEM_EVENT_CHECK_INTERVAL, TimeUnit.HOUR);

    SchedulerEntry schedulerEntry = new SchedulerEntryImpl(className, trigger);

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

From source file:com.liferay.exportimport.web.internal.messaging.DraftExportImportConfigurationMessageListener.java

License:Open Source License

@Activate
protected void activate() {
    Class<?> clazz = getClass();

    String className = clazz.getName();

    Trigger trigger = _triggerFactory.createTrigger(className, className, null, null,
            ExportImportWebConfigurationValues.DRAFT_EXPORT_IMPORT_CONFIGURATION_CHECK_INTERVAL, TimeUnit.HOUR);

    SchedulerEntry schedulerEntry = new SchedulerEntryImpl(className, trigger);

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