博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Using the Eclipse Jobs-API(转载)
阅读量:7050 次
发布时间:2019-06-28

本文共 2200 字,大约阅读时间需要 7 分钟。

@ 19:07

jobs_title.pngA common usecase is running long processes and waiting for their completion. Therefore responsiveness is an important feature, that can be realized with the jobs-framework provided by eclipse. The user wants to continue working while a long running job is scheduled, not sitting in front of a frozen UI that is not responding until the job has finished.

Today I want to demonstrate some key features of the jobs api and encourage RCP developers to use the functionality to make a user friendly interaction and a clear management of your application-specific jobs. A good article for this topic you can find on the .

The Eclipse Jobs API can be divided into three parts:

Jobs

Jobs are created in the plugins where the logic for processes are implemented. A job describes always a specific unit of work.

Job Manager

The job manager handles the queuing, starting and locking of jobs dependent from the properties of a job. When you schedule a job the job-manager will check the conditions like a scheduling-rule or a lock to avoid conflicts with other resources.

User Interface

The built-in user interface keeps the user on track and gives an overview of the scheduled jobs and their status.

Putting it togehter

No need for that. The frameworks takes the wiring of the tree components. If Job#schedule() is called the job is automatically queued into the Job Manager, the ProgressView will visualize the jobs that are queued.

Scheduling Rules

With scheduling rules you can implement logic if a job can proceed or scheduled. Therefore you have to provide an implementation of ISchedulingRule where the job-manager can determine if a job can be started.

Using the example

jobs_rcp.png

The example is a simple Eclipse RCP that demonstrates some features of the job-api. It works not directly on a job object, but on a wrapper, that makes life more easier and can also be used as a third-party-plugin for job-handling within your RCP.

The following feature are covered:

  • UIJob/NonUIJob
  • Dialog
  • Scheduling Rules
  • Delay
  • Job ReturnValues
  • Job-Images

Download

cvs_persp.gif CVS-Checkout

转载自:

http://www.richclient2.de/2006_09_28/using-the-eclipse-jobs-api/#more-79

参考: http://www.eclipse.org/articles/Article-Concurrency/jobs-api.html

你可能感兴趣的文章
我的友情链接
查看>>
处理vShpere中无法正常结束的任务的方法
查看>>
android开发的一些技巧和坑
查看>>
Canvas 的save()与 restore()的详细介绍
查看>>
我的友情链接
查看>>
了解KVM切换器的四种类形
查看>>
composer
查看>>
PS切图
查看>>
剑指Offer面试题:连续子数组的最大和
查看>>
设计一个算法,找出二叉树中某两个结点的第一个公共祖先.。不得将额外的结点存储在另外的数据结构中。注意:这不一定是二叉查找树。...
查看>>
新加坡美食流水账~
查看>>
linux 常用
查看>>
C#学习基本概念之方法
查看>>
C#学习基础---CategoryAttribute类
查看>>
keepalived基于双主模型实现nginx的高可用(2)
查看>>
Depends查依赖工具
查看>>
SSH Tunnel隧道
查看>>
微软云计算介绍与实践(实践之三十八)
查看>>
剖析top命令显示的VIRT RES SHR值
查看>>
adt升级后出错
查看>>