Package org.springframework.messaging.simp

Examples of org.springframework.messaging.simp.SimpMessageMappingInfo


  @Override
  protected SimpMessageMappingInfo getMappingForMethod(Method method, Class<?> handlerType) {
    MessageMapping typeAnnotation = AnnotationUtils.findAnnotation(handlerType, MessageMapping.class);
    MessageMapping messageAnnot = AnnotationUtils.findAnnotation(method, MessageMapping.class);
    if (messageAnnot != null) {
      SimpMessageMappingInfo result = createMessageMappingCondition(messageAnnot);
      if (typeAnnotation != null) {
        result = createMessageMappingCondition(typeAnnotation).combine(result);
      }
      return result;
    }
    SubscribeMapping subsribeAnnotation = AnnotationUtils.findAnnotation(method, SubscribeMapping.class);
    if (subsribeAnnotation != null) {
      SimpMessageMappingInfo result = createSubscribeCondition(subsribeAnnotation);
      if (typeAnnotation != null) {
        result = createMessageMappingCondition(typeAnnotation).combine(result);
      }
      return result;
    }
View Full Code Here


    }
    return null;
  }

  private SimpMessageMappingInfo createMessageMappingCondition(MessageMapping annotation) {
    return new SimpMessageMappingInfo(SimpMessageTypeMessageCondition.MESSAGE,
        new DestinationPatternsMessageCondition(annotation.value(), this.pathMatcher));
  }
View Full Code Here

    return new SimpMessageMappingInfo(SimpMessageTypeMessageCondition.MESSAGE,
        new DestinationPatternsMessageCondition(annotation.value(), this.pathMatcher));
  }

  private SimpMessageMappingInfo createSubscribeCondition(SubscribeMapping annotation) {
    return new SimpMessageMappingInfo(SimpMessageTypeMessageCondition.SUBSCRIBE,
        new DestinationPatternsMessageCondition(annotation.value(), this.pathMatcher));
  }
View Full Code Here

TOP

Related Classes of org.springframework.messaging.simp.SimpMessageMappingInfo

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.