I want to know the whether the build executors in jenkins are idle(either free or any job is running in the master node), by using java-jenkins API. And my requirement is like this.
- If any executor is free I've to trigger a jenkins job otherwise I'll wait till they are available.
- For this I've to use API of Jenkins
- And all this implementation I've to do in Java
Please help me which API method will give that status of executor.Executors are the highlighted things shown in the pic below: