Class CustomBindingService

java.lang.Object
org.springframework.cloud.stream.binding.BindingService
com.totvs.tjf.messaging.binder.CustomBindingService

public class CustomBindingService extends org.springframework.cloud.stream.binding.BindingService
Overrides BindingService to avoid ClassCastException when the Binder is not an instance of PollableConsumerBinder
Author:
Daniel Cavalcante
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomBindingService(org.springframework.cloud.stream.config.BindingServiceProperties bindingServiceProperties, org.springframework.cloud.stream.binder.BinderFactory binderFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
     
    CustomBindingService(org.springframework.cloud.stream.config.BindingServiceProperties bindingServiceProperties, org.springframework.cloud.stream.binder.BinderFactory binderFactory, org.springframework.scheduling.TaskScheduler taskScheduler, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> org.springframework.cloud.stream.binder.Binding<T>
    doBindPollableConsumer(T input, String inputName, org.springframework.cloud.stream.binder.Binder<T,org.springframework.cloud.stream.binder.ConsumerProperties,?> binder, org.springframework.cloud.stream.binder.ConsumerProperties consumerProperties, String target)
     
    <T> void
    reschedulePollableConsumerBinding(T input, String inputName, org.springframework.cloud.stream.binder.Binder<T,org.springframework.cloud.stream.binder.ConsumerProperties,?> binder, org.springframework.cloud.stream.binder.ConsumerProperties consumerProperties, String target, CustomBindingService.LateBinding<T> late, RuntimeException exception)
     

    Methods inherited from class org.springframework.cloud.stream.binding.BindingService

    bindConsumer, bindProducer, bindProducer, bindProducer, doBindConsumer, doBindProducer, getBinder, getBindingServiceProperties, getConsumerBindingNames, getExtendedProducerProperties, getProducerBindingNames, rescheduleConsumerBinding, reschedulePollableConsumerBinding, rescheduleProducerBinding, unbindConsumers, unbindProducers

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomBindingService

      public CustomBindingService(org.springframework.cloud.stream.config.BindingServiceProperties bindingServiceProperties, org.springframework.cloud.stream.binder.BinderFactory binderFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • CustomBindingService

      public CustomBindingService(org.springframework.cloud.stream.config.BindingServiceProperties bindingServiceProperties, org.springframework.cloud.stream.binder.BinderFactory binderFactory, org.springframework.scheduling.TaskScheduler taskScheduler, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • doBindPollableConsumer

      public <T> org.springframework.cloud.stream.binder.Binding<T> doBindPollableConsumer(T input, String inputName, org.springframework.cloud.stream.binder.Binder<T,org.springframework.cloud.stream.binder.ConsumerProperties,?> binder, org.springframework.cloud.stream.binder.ConsumerProperties consumerProperties, String target)
      Overrides:
      doBindPollableConsumer in class org.springframework.cloud.stream.binding.BindingService
    • reschedulePollableConsumerBinding

      public <T> void reschedulePollableConsumerBinding(T input, String inputName, org.springframework.cloud.stream.binder.Binder<T,org.springframework.cloud.stream.binder.ConsumerProperties,?> binder, org.springframework.cloud.stream.binder.ConsumerProperties consumerProperties, String target, CustomBindingService.LateBinding<T> late, RuntimeException exception)