Class GetFileIDsEventHandler

  • All Implemented Interfaces:
    org.bitrepository.client.eventhandler.EventHandler

    public class GetFileIDsEventHandler
    extends Object
    implements org.bitrepository.client.eventhandler.EventHandler
    • Constructor Detail

      • GetFileIDsEventHandler

        public GetFileIDsEventHandler​(String pillarID)
        Constructor
        Parameters:
        pillarID - The pillar which is expected to deliver the results.
    • Method Detail

      • handleEvent

        public void handleEvent​(org.bitrepository.client.eventhandler.OperationEvent event)
        Specified by:
        handleEvent in interface org.bitrepository.client.eventhandler.EventHandler
      • getFileIDsData

        public org.bitrepository.bitrepositoryelements.FileIDsData getFileIDsData()
        Method to obtain the received fileids data. The method should not be called prior to a call to waitForFinish() have returned.
        Returns:
        The fileids data if it have been returned by the pillar, otherwise null.
      • waitForFinish

        public void waitForFinish()
                           throws InterruptedException
        Method to wait for the operation to complete. The method is blocking.
        Throws:
        InterruptedException - if the thread is interrupted
      • partialResults

        public boolean partialResults()
        Method to determine if the received results is a partial result set. I.e. should the client send a new request to get more results. The method should not be called prior to a call to waitForFinish() have returned.
        Returns:
        true if the results are partial
      • hasFailed

        public boolean hasFailed()
        Method to determine if the operation was successful. The method should not be called prior to a call to waitForFinish() have returned.
        Returns:
        true if the operation succeeded, otherwise false.