Class ModifiableSupplier

  • All Implemented Interfaces:
    net.devslash.AfterHook , net.devslash.RequestDataSupplier , net.devslash.SimpleAfterHook

    
    public final class ModifiableSupplier<T extends Object>
     implements RequestDataSupplier<T>, SimpleAfterHook
                        

    An after hook is necessary for this hook - as it's important to track if all requests have been attempted. This is due to the fact that the very last request may add more data, and thus when the delegate sends its last RequestData we must wait till that data has run through the after hooks before we know that there's no more RequestData to add to the modifiedQueue.

    During this time between the last from the delegate, and the final request going through the getDataForRequest method will block the calling thread as it's unsure of its response.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      ModifiableSupplier(RequestDataSupplier<T> delegate)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Boolean add(RequestData<T> data)
      RequestData<T> getDataForRequest()
      Unit accept(HttpResponse resp)
      • Methods inherited from class net.devslash.RequestDataSupplier

        init
      • Methods inherited from class java.lang.Object

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

      • ModifiableSupplier

        ModifiableSupplier(RequestDataSupplier<T> delegate)