Skip to content

Exposes next permitted poll time on all valid polling responses

Choose a tag to compare

@sindrebn sindrebn released this 22 Mar 09:46
  • All instances of PortalJobStatusChanged exposes the next permitted poll time (getNextPermittedPollTime).
  • All instances of DirectJobStatusResponse for jobs created with statusRetrievalMethod set to POLLING exposes the next permitted poll time (getNextPermittedPollTime).

Consumers of the library are expected to query this and schedule the next polling based on the response from the service.

See the documentation for direct jobs and portal jobs for examples on how to handle this.

Breaking changes

  • Method getNextPermittedPollTime is removed from TooEagerPollingException. Consumers should retrieve the next permitted poll time from the valid responses, as described above. By removing this we try to discourage exception driven logic. This exception should never be caught, schedule polling based on the valid responses instead.
  • Constants NO_UPDATED_STATUS in DirectJobStatusResponse and PortalJobStatusChanged are removed. Use method .is(NO_CHANGES) on the instances to determine whether the queue was empty or not.