Alternatively you could program it on your own. You could get the attributes (this is an Set) and there is a value which represents the queue count ("queued-job-count").
You could then check this attribute to see if it is 0, so you would know that the printer finished its job.
If you use this approach, note that changes in the Set will not be modified so if you want to check a change you would have to call the getAttributes() method every time and compare the old Set with the new one.
Also note that because the return type is a Set, the order is not guaranteed to be the same on every call.