org.springframework.amqp.core.Binding.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(180)

本文整理了Java中org.springframework.amqp.core.Binding.<init>()方法的一些代码示例,展示了Binding.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.<init>()方法的具体详情如下:
包路径:org.springframework.amqp.core.Binding
类名称:Binding
方法名:<init>

Binding.<init>介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-amqp

public Binding and(Map<String, Object> map) {
  return new Binding(this.configurer.destination.name, this.configurer.destination.type, this.configurer.exchange,
      this.routingKey, map);
}

代码示例来源:origin: spring-projects/spring-amqp

public Binding withQueueName() {
    return new Binding(destination.name, destination.type, exchange, destination.name,
        Collections.<String, Object>emptyMap());
  }
}

代码示例来源:origin: spring-projects/spring-amqp

public Binding with(String routingKey) {
  return new Binding(destination.name, destination.type, exchange, routingKey,
      Collections.<String, Object>emptyMap());
}

代码示例来源:origin: spring-projects/spring-amqp

public Binding noargs() {
  return new Binding(this.configurer.destination.name, this.configurer.destination.type, this.configurer.exchange,
      this.routingKey, Collections.<String, Object>emptyMap());
}

代码示例来源:origin: spring-projects/spring-amqp

public Binding with(String routingKey) {
  return new Binding(destination.name, destination.type, exchange, routingKey,
      Collections.<String, Object>emptyMap());
}

代码示例来源:origin: spring-projects/spring-amqp

public Binding with(Enum<?> routingKeyEnum) {
    return new Binding(destination.name, destination.type, exchange, routingKeyEnum.toString(),
        Collections.<String, Object>emptyMap());
  }
}

代码示例来源:origin: spring-projects/spring-amqp

public Binding with(Enum<?> routingKeyEnum) {
  return new Binding(destination.name, destination.type, exchange, routingKeyEnum.toString(),
      Collections.<String, Object>emptyMap());
}

代码示例来源:origin: spring-projects/spring-amqp

public Binding exists() {
  return new Binding(HeadersExchangeMapConfigurer.this.destination.name,
      HeadersExchangeMapConfigurer.this.destination.type,
      HeadersExchangeMapConfigurer.this.exchange.getName(), "", createMapForKeys(this.key));
}

代码示例来源:origin: spring-projects/spring-amqp

public Binding match() {
    return new Binding(HeadersExchangeMapConfigurer.this.destination.name,
        HeadersExchangeMapConfigurer.this.destination.type,
        HeadersExchangeMapConfigurer.this.exchange.getName(), "", this.headerMap);
  }
}

代码示例来源:origin: io.corbel.lib/rabbitmq

@Override
public void bind(final String exchangeName, String destination, DestinationType destinationType,
    Optional<String> routingKey, Optional<Map<String, Object>> arguments) {
  rabbitAdmin.declareBinding(new Binding(destination, destinationType, exchangeName, routingKey.orElse(""),
      arguments.orElse(null)));
}

代码示例来源:origin: spring-projects/spring-amqp

public Binding matches(Object value) {
    Map<String, Object> map = new HashMap<String, Object>();
    map.put(this.key, value);
    return new Binding(HeadersExchangeMapConfigurer.this.destination.name,
        HeadersExchangeMapConfigurer.this.destination.type,
        HeadersExchangeMapConfigurer.this.exchange.getName(), "", map);
  }
}

代码示例来源:origin: spring-projects/spring-amqp

public Binding exist() {
    return new Binding(HeadersExchangeMapConfigurer.this.destination.name,
        HeadersExchangeMapConfigurer.this.destination.type,
        HeadersExchangeMapConfigurer.this.exchange.getName(), "", this.headerMap);
  }
}

代码示例来源:origin: spring-projects/spring-amqp

@Bean
public Declarables bs() {
  return new Declarables(
      new Binding("q2", DestinationType.QUEUE, "e2", "k2", null),
      new Binding("q3", DestinationType.QUEUE, "e3", "k3", null));
}

代码示例来源:origin: spring-projects/spring-amqp

@Nullable
private Binding convert(@Nullable BindingInfo bi) {
  if (bi == null) {
    return null;
  }
  return new Binding(bi.getDestination(), DestinationType.valueOf(bi.getDestinationType().toUpperCase()),
      bi.getSource(), bi.getRoutingKey(), bi.getArguments());
}

代码示例来源:origin: org.springframework.amqp/spring-rabbit

@Nullable
private Binding convert(@Nullable BindingInfo bi) {
  if (bi == null) {
    return null;
  }
  return new Binding(bi.getDestination(), DestinationType.valueOf(bi.getDestinationType().toUpperCase()),
      bi.getSource(), bi.getRoutingKey(), bi.getArguments());
}

代码示例来源:origin: spring-projects/spring-amqp

@Bean
public Declarables ds() {
  return new Declarables(
      new DirectExchange("e4", false, true),
      new Queue("q4", false, false, true),
      new Binding("q4", DestinationType.QUEUE, "e4", "k4", null));
}

代码示例来源:origin: spring-projects/spring-amqp

@Bean
  public Binding binding() throws IOException {
    Binding binding = new Binding("foo", DestinationType.QUEUE, exchange().getName(), "foo", null);
    binding.setAdminsThatShouldDeclare(admin1());
    return binding;
  }
}

代码示例来源:origin: spring-projects/spring-amqp

@Test
public void testRemoveBindingWithDefaultExchangeImplicitBinding() throws Exception {
  String queueName = "test.queue";
  final Queue queue = new Queue(queueName, false, false, false);
  rabbitAdmin.declareQueue(queue);
  Binding binding = new Binding(queueName, DestinationType.QUEUE, RabbitAdmin.DEFAULT_EXCHANGE_NAME, queueName, null);
  rabbitAdmin.removeBinding(binding);
  // Pass by virtue of RabbitMQ not firing a 403 reply code
}

代码示例来源:origin: spring-projects/spring-amqp

@Test
public void testSpringWithDefaultExchangeImplicitBinding() throws Exception {
  Exchange exchange = new DirectExchange(RabbitAdmin.DEFAULT_EXCHANGE_NAME);
  context.getBeanFactory().registerSingleton("foo", exchange);
  String queueName = "test.queue";
  final Queue queue = new Queue(queueName, false, false, false);
  context.getBeanFactory().registerSingleton("bar", queue);
  Binding binding = new Binding(queueName, DestinationType.QUEUE, exchange.getName(), queueName, null);
  context.getBeanFactory().registerSingleton("baz", binding);
  rabbitAdmin.afterPropertiesSet();
  rabbitAdmin.initialize();
  // Pass by virtue of RabbitMQ not firing a 403 reply code for both exchange and binding declaration
  assertTrue(queueExists(queue));
}

代码示例来源:origin: spring-projects/spring-amqp

@Test
public void testDeclareBindingWithDefaultExchangeImplicitBinding() throws Exception {
  Exchange exchange = new DirectExchange(RabbitAdmin.DEFAULT_EXCHANGE_NAME);
  String queueName = "test.queue";
  final Queue queue = new Queue(queueName, false, false, false);
  rabbitAdmin.declareQueue(queue);
  Binding binding = new Binding(queueName, DestinationType.QUEUE, exchange.getName(), queueName, null);
  rabbitAdmin.declareBinding(binding);
  // Pass by virtue of RabbitMQ not firing a 403 reply code for both exchange and binding declaration
  assertTrue(queueExists(queue));
}

相关文章