提交 7ee77f4f 编写于 作者: K kohsuke

[FIXED HUDSON-1886] build queue is exposed to the remote API under http://server/hudson/queue/api

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10235 71c3de6d-444a-0410-be80-ed276b4c234a
上级 8896a3af
......@@ -47,6 +47,7 @@ import java.util.logging.Logger;
*
* @author Kohsuke Kawaguchi
*/
@ExportedBean
public class Queue extends ResourceController {
/**
* Items that are waiting for its quiet period to pass.
......@@ -268,6 +269,7 @@ public class Queue extends ResourceController {
/**
* Gets a snapshot of items in the queue.
*/
@Exported(inline=true)
public synchronized Item[] getItems() {
Item[] r = new Item[waitingList.size() + blockedProjects.size() + buildables.size()];
waitingList.toArray(r);
......@@ -572,6 +574,10 @@ public class Queue extends ResourceController {
}
}
public Api getApi() {
return new Api(this);
}
/**
* Task whose execution is controlled by the queue.
* <p>
......@@ -673,6 +679,7 @@ public class Queue extends ResourceController {
/**
* Project to be built.
*/
@Exported
public final Task task;
/**
......
......@@ -12,4 +12,9 @@
To copy a job, send a POST request to <a href="../createItem">this URL</a> with
three query parameters <tt>name=<i>NEWJOBNAME</i>&amp;mode=copyJob&amp;from=<i>FROMJOBNAME</i></tt>
</p>
<h2>Build Queue</h2>
<p>
Build queue has <a href="../queue/api/">its own separate API</a>.
</p>
</j:jelly>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册