Codota Logo
QueueMessageHandler$MappingInformation
Code IndexAdd Codota to your IDE (free)

How to use
QueueMessageHandler$MappingInformation
in
org.springframework.cloud.aws.messaging.listener

Best Java code snippets using org.springframework.cloud.aws.messaging.listener.QueueMessageHandler$MappingInformation (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: org.springframework.integration/spring-integration-aws

@Override
public Map<MappingInformation, HandlerMethod> getHandlerMethods() {
  Set<String> queues = new HashSet<>(Arrays.asList(SqsMessageDrivenChannelAdapter.this.queues));
  MappingInformation mappingInformation = new MappingInformation(queues,
      SqsMessageDrivenChannelAdapter.this.messageDeletionPolicy);
  return Collections.singletonMap(mappingInformation, null);
}
origin: spring-cloud/spring-cloud-aws

@Override
protected MappingInformation getMatchingMapping(MappingInformation mapping, Message<?> message) {
  if (mapping.getLogicalResourceIds().contains(getDestination(message))) {
    return mapping;
  } else {
    return null;
  }
}
origin: spring-cloud/spring-cloud-aws

@Override
protected Set<String> getDirectLookupDestinations(MappingInformation mapping) {
  return mapping.getLogicalResourceIds();
}
origin: org.springframework.cloud/spring-cloud-aws-messaging

@Override
protected MappingInformation getMatchingMapping(MappingInformation mapping, Message<?> message) {
  if (mapping.getLogicalResourceIds().contains(getDestination(message))) {
    return mapping;
  } else {
    return null;
  }
}
origin: spring-projects/spring-integration-aws

@Override
public Map<MappingInformation, HandlerMethod> getHandlerMethods() {
  Set<String> queues = new HashSet<>(Arrays.asList(SqsMessageDrivenChannelAdapter.this.queues));
  MappingInformation mappingInformation = new MappingInformation(queues,
      SqsMessageDrivenChannelAdapter.this.messageDeletionPolicy);
  return Collections.singletonMap(mappingInformation, null);
}
origin: org.springframework.cloud/spring-cloud-aws-messaging

@Override
protected Set<String> getDirectLookupDestinations(MappingInformation mapping) {
  return mapping.getLogicalResourceIds();
}
origin: spring-cloud/spring-cloud-aws

@Override
protected MappingInformation getMappingForMethod(Method method, Class<?> handlerType) {
  SqsListener sqsListenerAnnotation = AnnotationUtils.findAnnotation(method, SqsListener.class);
  if (sqsListenerAnnotation != null && sqsListenerAnnotation.value().length > 0) {
    if (sqsListenerAnnotation.deletionPolicy() == SqsMessageDeletionPolicy.NEVER && hasNoAcknowledgmentParameter(method.getParameterTypes())) {
      this.logger.warn("Listener method '" + method.getName() + "' in type '" + method.getDeclaringClass().getName() +
          "' has deletion policy 'NEVER' but does not have a parameter of type Acknowledgment.");
    }
    return new MappingInformation(resolveDestinationNames(sqsListenerAnnotation.value()), sqsListenerAnnotation.deletionPolicy());
  }
  MessageMapping messageMappingAnnotation = AnnotationUtils.findAnnotation(method, MessageMapping.class);
  if (messageMappingAnnotation != null && messageMappingAnnotation.value().length > 0) {
    return new MappingInformation(resolveDestinationNames(messageMappingAnnotation.value()), SqsMessageDeletionPolicy.ALWAYS);
  }
  return null;
}
origin: org.springframework.cloud/spring-cloud-aws-messaging

@Override
protected MappingInformation getMappingForMethod(Method method, Class<?> handlerType) {
  SqsListener sqsListenerAnnotation = AnnotationUtils.findAnnotation(method, SqsListener.class);
  if (sqsListenerAnnotation != null && sqsListenerAnnotation.value().length > 0) {
    if (sqsListenerAnnotation.deletionPolicy() == SqsMessageDeletionPolicy.NEVER && hasNoAcknowledgmentParameter(method.getParameterTypes())) {
      this.logger.warn("Listener method '" + method.getName() + "' in type '" + method.getDeclaringClass().getName() +
          "' has deletion policy 'NEVER' but does not have a parameter of type Acknowledgment.");
    }
    return new MappingInformation(resolveDestinationNames(sqsListenerAnnotation.value()), sqsListenerAnnotation.deletionPolicy());
  }
  MessageMapping messageMappingAnnotation = AnnotationUtils.findAnnotation(method, MessageMapping.class);
  if (messageMappingAnnotation != null && messageMappingAnnotation.value().length > 0) {
    return new MappingInformation(resolveDestinationNames(messageMappingAnnotation.value()), SqsMessageDeletionPolicy.ALWAYS);
  }
  return null;
}
origin: spring-cloud/spring-cloud-aws

protected void initialize() {
  synchronized (this.getLifecycleMonitor()) {
    if (this.destinationResolver == null) {
      if (this.resourceIdResolver == null) {
        this.destinationResolver = new CachingDestinationResolverProxy<>(new DynamicQueueUrlDestinationResolver(this.amazonSqs));
      } else {
        this.destinationResolver = new CachingDestinationResolverProxy<>(new DynamicQueueUrlDestinationResolver(this.amazonSqs, this.resourceIdResolver));
      }
    }
    for (QueueMessageHandler.MappingInformation mappingInformation : this.messageHandler.getHandlerMethods().keySet()) {
      for (String queue : mappingInformation.getLogicalResourceIds()) {
        QueueAttributes queueAttributes = queueAttributes(queue, mappingInformation.getDeletionPolicy());
        if (queueAttributes != null) {
          this.registeredQueues.put(queue, queueAttributes);
        }
      }
    }
    this.active = true;
    this.getLifecycleMonitor().notifyAll();
  }
}
origin: org.springframework.cloud/spring-cloud-aws-messaging

protected void initialize() {
  synchronized (this.getLifecycleMonitor()) {
    if (this.destinationResolver == null) {
      if (this.resourceIdResolver == null) {
        this.destinationResolver = new CachingDestinationResolverProxy<>(new DynamicQueueUrlDestinationResolver(this.amazonSqs));
      } else {
        this.destinationResolver = new CachingDestinationResolverProxy<>(new DynamicQueueUrlDestinationResolver(this.amazonSqs, this.resourceIdResolver));
      }
    }
    for (QueueMessageHandler.MappingInformation mappingInformation : this.messageHandler.getHandlerMethods().keySet()) {
      for (String queue : mappingInformation.getLogicalResourceIds()) {
        QueueAttributes queueAttributes = queueAttributes(queue, mappingInformation.getDeletionPolicy());
        if (queueAttributes != null) {
          this.registeredQueues.put(queue, queueAttributes);
        }
      }
    }
    this.active = true;
    this.getLifecycleMonitor().notifyAll();
  }
}
org.springframework.cloud.aws.messaging.listenerQueueMessageHandler$MappingInformation

Most used methods

  • <init>
  • getDeletionPolicy
  • getLogicalResourceIds

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • findViewById (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now