Correct clientInboundChannel assertion (includes constructor javadoc)

Closes gh-26896
This commit is contained in:
Juergen Hoeller
2021-05-11 15:49:38 +02:00
parent cd0570ee39
commit 9523f1ffd6
3 changed files with 26 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,10 +42,16 @@ public abstract class AbstractBrokerRegistration {
private final List<String> destinationPrefixes;
/**
* Create a new broker registration.
* @param clientInboundChannel the inbound channel
* @param clientOutboundChannel the outbound channel
* @param destinationPrefixes the destination prefixes
*/
public AbstractBrokerRegistration(SubscribableChannel clientInboundChannel,
MessageChannel clientOutboundChannel, @Nullable String[] destinationPrefixes) {
Assert.notNull(clientOutboundChannel, "'clientInboundChannel' must not be null");
Assert.notNull(clientInboundChannel, "'clientInboundChannel' must not be null");
Assert.notNull(clientOutboundChannel, "'clientOutboundChannel' must not be null");
this.clientInboundChannel = clientInboundChannel;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,8 +40,16 @@ public class SimpleBrokerRegistration extends AbstractBrokerRegistration {
private String selectorHeaderName = "selector";
public SimpleBrokerRegistration(SubscribableChannel inChannel, MessageChannel outChannel, String[] prefixes) {
super(inChannel, outChannel, prefixes);
/**
* Create a new {@code SimpleBrokerRegistration}.
* @param clientInboundChannel the inbound channel
* @param clientOutboundChannel the outbound channel
* @param destinationPrefixes the destination prefixes
*/
public SimpleBrokerRegistration(SubscribableChannel clientInboundChannel,
MessageChannel clientOutboundChannel, String[] destinationPrefixes) {
super(clientInboundChannel, clientOutboundChannel, destinationPrefixes);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -64,6 +64,12 @@ public class StompBrokerRelayRegistration extends AbstractBrokerRegistration {
private String userRegistryBroadcast;
/**
* Create a new {@code StompBrokerRelayRegistration}.
* @param clientInboundChannel the inbound channel
* @param clientOutboundChannel the outbound channel
* @param destinationPrefixes the destination prefixes
*/
public StompBrokerRelayRegistration(SubscribableChannel clientInboundChannel,
MessageChannel clientOutboundChannel, String[] destinationPrefixes) {