Interface Retailer

  • All Known Implementing Classes:
    Agency, Airline

    public interface Retailer
    Interface for retailers in the airline example. Retailers can provide offers synchronously and asynchronously.
    Author:
    Herbert Praehofer
    • Field Detail

      • RAND

        static final Random RAND
        Random number generator.
    • Method Detail

      • getOffer

        Offer getOffer​(Flight flight)
        Returns an offer for a flight in a synchronous way.
        Parameters:
        flight - the flight
        Returns:
        the offer for the flight
      • getOfferAsync

        default CompletableFuture<Offer> getOfferAsync​(Flight flight)
        Returns a completable future for an offer for a flight.
        Parameters:
        flight - the flight
        Returns:
        the completable future for the offer for the flight