@ParametersAreNonnullByDefault public class JobConfigModuleDescriptor extends com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
JobConfig
within a plugin.
In atlassian-plugin.xml:
<job-config name="My job" key="myJobId">
<job key="myJobRunner" perClusterJob="true" clusteredOnly="true"/>
<schedule cron-expression="0 * * * * ?" jitterSecs="10"/>
<managed editable="true" keepingHistory="true" canRunAdhoc="true" canDisable="true"/>
</job-config>
If using spring-scanner, ensure your job runner is defined as a spring bean with a
@org.springframework.stereotype.Component
or @javax.inject.Named
annotation:
{@code
Constructor and Description |
---|
JobConfigModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory,
ManagedScheduleJobRegistrationService jobRegistrationService,
com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager,
ClusterManager clusterManager,
com.atlassian.scheduler.SchedulerService schedulerService,
com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar,
com.atlassian.config.lifecycle.LifecycleManager lifecycleManager,
org.osgi.framework.BundleContext bundleContext) |
Modifier and Type | Method and Description |
---|---|
void |
disabled() |
void |
enabled() |
Void |
getModule() |
void |
init(com.atlassian.plugin.Plugin plugin,
org.dom4j.Element element) |
void |
listenApplicationStartedEvent() |
void |
onApplicationStartedEvent(com.atlassian.config.lifecycle.events.ApplicationStartedEvent event) |
assertModuleClassImplements, checkPermissions, destroy, destroy, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, getScopeKey, hashCode, isBroken, isEnabled, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, provideValidationRules, satisfiesMinJavaVersion, setBroken, setPlugin, toString
@Autowired public JobConfigModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory, ManagedScheduleJobRegistrationService jobRegistrationService, com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager, ClusterManager clusterManager, com.atlassian.scheduler.SchedulerService schedulerService, com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar, com.atlassian.config.lifecycle.LifecycleManager lifecycleManager, org.osgi.framework.BundleContext bundleContext)
@PostConstruct public void listenApplicationStartedEvent()
@EventListener public void onApplicationStartedEvent(com.atlassian.config.lifecycle.events.ApplicationStartedEvent event)
public void init(com.atlassian.plugin.Plugin plugin, org.dom4j.Element element) throws com.atlassian.plugin.PluginParseException
public Void getModule()
public void enabled()
enabled
in interface com.atlassian.plugin.StateAware
enabled
in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
public void disabled()
disabled
in interface com.atlassian.plugin.StateAware
disabled
in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
Copyright © 2003–2017 Atlassian. All rights reserved.