Skip to the content.
package com.bookshop.structural.facade;

import com.bookshop.domain.Customer;
import java.util.concurrent.atomic.AtomicLong;

/** Subsystem 3: booking the courier. */
public class ShippingService {

    private final AtomicLong nextConsignment = new AtomicLong(500);

    public String arrangeDelivery(Customer customer, String address) {
        return "ship-" + nextConsignment.incrementAndGet();
    }
}

Raw file