presto-main/src/main/java/io/prestosql/server/ServerInfoResource.java/ServerInfoResource/getServerState
class ServerInfoResource:    @GET
    @Path("state")
    @Produces(APPLICATION_JSON)
    public NodeState getServerState()
    {
        if (shutdownHandler.isShutdownRequested()) {
            return SHUTTING_DOWN;
        }
        else {
            return ACTIVE;
        }
    }