在Java Swing / 桌面应用中的作业调度程序库

huangapple go评论49阅读模式
英文:

Job Scheduler libraries in Java Swing / Desktop

问题

我需要为制造物品构建一个“作业调度程序”,它将用于根据“作业”和“日期时间”安排作业。我不知道在Java Swing应用程序/桌面中哪些组件会对创建这种表单有帮助,还需要一些其他“资源”。

是否存在任何库/ JAR文件可以帮助我创建这种用户可以安排作业并更改作业的需求,就像数据条一样?

我可以使用哪些组件来构建调度程序,就像项目调度程序一样?

英文:

I need to build a job scheduler for manufacturing items, which will be used to schedule a jobs depending upon the Jobs & Datetime. I don't have any idea which components will be helpful in Java Swing application / desktop & some other resources to create this sort of form.

Is there any library/jars exists to help me out to create this sort of requirements where user can schedule a job, can change a job like data bars?

Which components I can use to build scheduler, just like project scheduler?

答案1

得分: 0

经过长时间的探索选项,我通过现有的库找到了解决我的问题的方法,这个库很容易集成和控制。

Quartz 是我情况下最合适的选项。

Quartz调度程序的API和术语

1. 调度程序: -
用于安排、取消安排、添加和移除作业的主要API。

2. 作业: -
由代表“作业”的类实现的接口。它有一个名为execute()的方法,您可以在其中编写作业需要执行的工作。

3. 作业详情: -
作业详情代表作业的一个实例。它还包含以JobDataMap形式传递给作业的附加数据。每个作业详情都由作业键标识,包括名称和组。名称必须在组内是唯一的。

4. 触发器: -
触发器,顾名思义,定义了给定作业将被执行的计划。一个作业可以有多个触发器,但一个触发器只能与一个作业关联。每个触发器由触发器键标识,包括名称和组。名称必须在组内是唯一的,就像作业详情一样,触发器也可以向作业发送参数/数据。

5. 作业构建器: -
作业构建器是一种流畅的构建器风格API,用于构造作业详情实例。

6. 触发器构建器: -
触发器构建器用于实例化触发器。

英文:

After a long exploring options I found a solution of my problems through an existing libraries which is easy to integrate & controllable.

Quartz is the best fitted option in my case.

Quartz Scheduler’s APIs and Terminologies

1. Scheduler: -
The Primary API for scheduling, unscheduling, adding, and removing Jobs.

2. Job: -
The interface to be implemented by classes that represent a ‘job’ in Quartz. It has a single method called execute() where you write the work that needs to be performed by the Job.

3. JobDetail: -
A JobDetail represents an instance of a Job. It also contains additional data in the form of a JobDataMap that is passed to the Job when it is executed.
Every JobDetail is identified by a JobKey that consists of a name and a group. The name must be unique within a group.

4. Trigger: -
A Trigger, as the name suggests, defines the schedule at which a given Job will be executed. A Job can have many Triggers, but a Trigger can only be associated with one Job. Every Trigger is identified by a TriggerKey that comprises of a name and a group. The name must be unique within a group Just like JobDetails, Triggers can also send parameters/data to the Job.

5. JobBuilder: -
JobBuilder is a fluent builder-style API to construct JobDetail instances.

6. TriggerBuilder: -
TriggerBuilder is used to instantiate Triggers.

huangapple
  • 本文由 发表于 2023年7月13日 13:22:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/76676164.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定