Class GetFileIDsEventHandler

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

    public class GetFileIDsEventHandler
    extends java.lang.Object
    implements org.bitrepository.client.eventhandler.EventHandler
    • Constructor Summary

      Constructors 
      Constructor Description
      GetFileIDsEventHandler​(java.lang.String pillarID)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.bitrepository.bitrepositoryelements.FileIDsData getFileIDsData()
      Method to obtain the received fileids data.
      void handleEvent​(org.bitrepository.client.eventhandler.OperationEvent event)  
      boolean hasFailed()
      Method to determine if the operation was successful.
      boolean partialResults()
      Method to determine if the received results is a partial result set.
      void waitForFinish()
      Method to wait for the operation to complete.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GetFileIDsEventHandler

        public GetFileIDsEventHandler​(java.lang.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 java.lang.InterruptedException
        Method to wait for the operation to complete. The method is blocking.
        Throws:
        java.lang.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.