code: public static CommunicationMode communicationMode(Method method) {
      Class<?> returnType = method.getReturnType();
      if (isRequestChannel(method)) {
        return REQUEST_CHANNEL;
      } else if (returnType.isAssignableFrom(Flux.class)) {
        return REQUEST_STREAM;
      } else if (returnType.isAssignableFrom(Mono.class)) {
        return REQUEST_RESPONSE;
      } else if (returnType.isAssignableFrom(Void.TYPE)) {
        return FIRE_AND_FORGET;
      } else {
        throw new IllegalArgumentException(
            "Service method is not supported (check return type or parameter type): " + method);
      }
    }
docs: This method is used to get catual {@link CommunicationMode} os service method.
  
  <p>The following modes are supported:
  
  <ul>
  <li>{@link CommunicationMode#REQUEST_CHANNEL} - service has at least one parameter,and the
  first parameter is either of type return type {@link Flux} or {@link Publisher};
  <li>{@link CommunicationMode#REQUEST_STREAM} - service's return type is {@link Flux}, and
  parameter is not {@link Flux};
  <li>{@link CommunicationMode#REQUEST_RESPONSE} - service's return type is Mono;
  <li>{@link CommunicationMode#FIRE_AND_FORGET} - service returns void;
  </ul>
  
  @param method - Service method to be analyzed.
  @return - {@link CommunicationMode} of service method. If method does not correspond to any of
  supported modes, throws {@link IllegalArgumentException}