Package org.springframework.messaging.handler

Examples of org.springframework.messaging.handler.HandlerMethod$ReturnValueMethodParameter


   * @throws IllegalStateException if another method was already registered
   * under the same mapping
   */
  protected void registerHandlerMethod(Object handler, Method method, T mapping) {

    HandlerMethod newHandlerMethod = createHandlerMethod(handler, method);
    HandlerMethod oldHandlerMethod = handlerMethods.get(mapping);

    if (oldHandlerMethod != null && !oldHandlerMethod.equals(newHandlerMethod)) {
      throw new IllegalStateException("Ambiguous mapping found. Cannot map '" + newHandlerMethod.getBean()
          + "' bean method \n" + newHandlerMethod + "\nto " + mapping + ": There is already '"
          + oldHandlerMethod.getBean() + "' bean method\n" + oldHandlerMethod + " mapped.");
    }

    this.handlerMethods.put(mapping, newHandlerMethod);
    if (logger.isInfoEnabled()) {
      logger.info("Mapped \"" + mapping + "\" onto " + newHandlerMethod);
View Full Code Here


  /**
   * Create a HandlerMethod instance from an Object handler that is either a handler
   * instance or a String-based bean name.
   */
  protected HandlerMethod createHandlerMethod(Object handler, Method method) {
    HandlerMethod handlerMethod;
    if (handler instanceof String) {
      String beanName = (String) handler;
      handlerMethod = new HandlerMethod(beanName, this.applicationContext, method);
    }
    else {
      handlerMethod = new HandlerMethod(handler, method);
    }
    return handlerMethod;
  }
View Full Code Here

TOP

Related Classes of org.springframework.messaging.handler.HandlerMethod$ReturnValueMethodParameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.