Class InteractiveSignedObjectIdSource

java.lang.Object
com.atlassian.bitbucket.scm.signed.InteractiveSignedObjectIdSource
All Implemented Interfaces:
SignedObjectIdSource

public class InteractiveSignedObjectIdSource extends Object implements SignedObjectIdSource
SignedObjectIdSource that you can add items to that blocks until a next item becomes available or complete() is called.
Since:
5.1
  • Constructor Details

    • InteractiveSignedObjectIdSource

      public InteractiveSignedObjectIdSource()
  • Method Details

    • add

      public void add(@Nonnull String objectId)
      Adds an object ID to be returned by this source.
      Parameters:
      objectId - the next object ID
    • complete

      public void complete()
      Marks the source as complete. After this method is called, hasNext() will return false after all previously added object IDs have been returned.
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface SignedObjectIdSource
      Returns:
      true if there are any more object IDs to be resolved.
    • next

      @Nonnull public String next()
      Specified by:
      next in interface SignedObjectIdSource
      Returns:
      the next object ID