private void initDiscoveryListener() {
        this.discoveryClient.registerEventListener(event -> {
            if (event instanceof StatusChangeEvent sce) {
                

                LOG.info("Received {}", sce);

                if (sce.getPreviousStatus() == InstanceInfo.InstanceStatus.UP
                        && (sce.getStatus() == InstanceInfo.InstanceStatus.OUT_OF_SERVICE
                                || sce.getStatus() == InstanceInfo.InstanceStatus.DOWN)) {
                    // TODO - Also should stop accepting any new client connections now too?

                    // Schedule to gracefully close all the client connections.
                    if (ENABLED.get()) {
                        executor.schedule(
                                () -> gracefullyShutdownClientChannels(ShutdownType.OUT_OF_SERVICE),
                                DELAY_AFTER_OUT_OF_SERVICE_MS.get(),
                                TimeUnit.MILLISECONDS);
                    }
                }
            }
        });
    }
TODO: Change this class to be an instance per-port.
So that then the configuration can be different per-port, which is need for the combined FTL/Cloud clusters.
<p>
User: michaels@netflix.com
Date: 3/6/17
Time: 12:36 PM
zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientConnectionsShutdown.java