Remove deprecations from previous versions
* Remove Boon dependency and its usage * Remove overloaded methods from the `IntegrationFlowDefinition` - we can simply rely now on the super class * Remove (or rework) deprecated entities in the docs * Fix tests for removed deprecated APIs * Rework affected tests to JUnit 5
This commit is contained in:
committed by
Gary Russell
parent
cfaabe2a8d
commit
370e943428
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2019 the original author or authors.
|
||||
* Copyright 2019-2020 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.
|
||||
@@ -58,18 +58,6 @@ public class RSocketOutboundGatewaySpec extends MessageHandlerSpec<RSocketOutbou
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure an {@link RSocketOutboundGateway.Command} for the RSocket request type.
|
||||
* @param command the {@link RSocketOutboundGateway.Command} to use.
|
||||
* @return the spec
|
||||
* @see RSocketOutboundGateway#setCommand(RSocketOutboundGateway.Command)
|
||||
* @deprecated in favor of {@link #interactionModel(RSocketInteractionModel)}
|
||||
*/
|
||||
@Deprecated
|
||||
public RSocketOutboundGatewaySpec command(RSocketOutboundGateway.Command command) {
|
||||
return interactionModel(new ValueExpression<>(command));
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure an {@link RSocketInteractionModel} for the RSocket request type.
|
||||
* @param interactionModel the {@link RSocketInteractionModel} to use.
|
||||
@@ -81,20 +69,6 @@ public class RSocketOutboundGatewaySpec extends MessageHandlerSpec<RSocketOutbou
|
||||
return interactionModel(new ValueExpression<>(interactionModel));
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a {@link Function} to evaluate an {@link RSocketOutboundGateway.Command}
|
||||
* for the RSocket request type at runtime against a request message.
|
||||
* @param commandFunction the {@code Function} to use.
|
||||
* @param <P> the expected request message payload type.
|
||||
* @return the spec
|
||||
* @see RSocketOutboundGateway#setInteractionModelExpression(Expression)
|
||||
* @deprecated in favor of {@link #interactionModel(Function)}
|
||||
*/
|
||||
@Deprecated
|
||||
public <P> RSocketOutboundGatewaySpec command(Function<Message<P>, ?> commandFunction) {
|
||||
return interactionModel(commandFunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a {@link Function} to evaluate an {@link RSocketInteractionModel}
|
||||
* for the RSocket request type at runtime against a request message.
|
||||
@@ -108,19 +82,6 @@ public class RSocketOutboundGatewaySpec extends MessageHandlerSpec<RSocketOutbou
|
||||
return interactionModel(new FunctionExpression<>(interactionModelFunction));
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a SpEL expression to evaluate an {@link RSocketOutboundGateway.Command}
|
||||
* for the RSocket request type at runtime against a request message.
|
||||
* @param commandExpression the SpEL expression to use.
|
||||
* @return the spec
|
||||
* @see RSocketOutboundGateway#setInteractionModelExpression(Expression)
|
||||
* @deprecated in favor of {@link #interactionModel(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public RSocketOutboundGatewaySpec command(String commandExpression) {
|
||||
return interactionModel(commandExpression);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a SpEL expression to evaluate an {@link RSocketInteractionModel}
|
||||
* for the RSocket request type at runtime against a request message.
|
||||
@@ -133,19 +94,6 @@ public class RSocketOutboundGatewaySpec extends MessageHandlerSpec<RSocketOutbou
|
||||
return interactionModel(PARSER.parseExpression(interactionModelExpression));
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a SpEL expression to evaluate an {@link RSocketOutboundGateway.Command}
|
||||
* for the RSocket request type at runtime against a request message.
|
||||
* @param commandExpression the SpEL expression to use.
|
||||
* @return the spec
|
||||
* @see RSocketOutboundGateway#setInteractionModelExpression(Expression)
|
||||
* @deprecated in favor of {@link #interactionModel(Expression)}
|
||||
*/
|
||||
@Deprecated
|
||||
public RSocketOutboundGatewaySpec command(Expression commandExpression) {
|
||||
return interactionModel(commandExpression);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a SpEL expression to evaluate an {@link RSocketInteractionModel}
|
||||
* for the RSocket request type at runtime against a request message.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2019 the original author or authors.
|
||||
* Copyright 2019-2020 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.
|
||||
@@ -130,16 +130,6 @@ public class RSocketOutboundGateway extends AbstractReplyProducingMessageHandler
|
||||
this.clientRSocketConnector = clientRSocketConnector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a {@link Command} for the RSocket request type.
|
||||
* @param command the {@link Command} to use.
|
||||
* @deprecated in favor of {@link #setInteractionModel(RSocketInteractionModel)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void setCommand(Command command) {
|
||||
setInteractionModelExpression(new ValueExpression<>(command.interactionModel));
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure an {@link RSocketInteractionModel} for the RSocket request type.
|
||||
* @param interactionModel the {@link RSocketInteractionModel} to use.
|
||||
@@ -149,17 +139,6 @@ public class RSocketOutboundGateway extends AbstractReplyProducingMessageHandler
|
||||
setInteractionModelExpression(new ValueExpression<>(interactionModel));
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a SpEL expression to evaluate a {@link Command} for the RSocket request type at runtime
|
||||
* against a request message.
|
||||
* @param commandExpression the SpEL expression to use.
|
||||
* @deprecated in favor of {@link #setInteractionModelExpression(Expression)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void setCommandExpression(Expression commandExpression) {
|
||||
setInteractionModelExpression(commandExpression);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a SpEL expression to evaluate an {@link RSocketInteractionModel}
|
||||
* for the RSocket request type at runtime against a request message.
|
||||
@@ -337,9 +316,6 @@ public class RSocketOutboundGateway extends AbstractReplyProducingMessageHandler
|
||||
if (value instanceof RSocketInteractionModel) {
|
||||
return (RSocketInteractionModel) value;
|
||||
}
|
||||
else if (value instanceof Command) {
|
||||
return ((Command) value).interactionModel;
|
||||
}
|
||||
else if (value instanceof String) {
|
||||
return RSocketInteractionModel.valueOf((String) value);
|
||||
}
|
||||
@@ -372,39 +348,4 @@ public class RSocketOutboundGateway extends AbstractReplyProducingMessageHandler
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enumeration of commands supported by the gateways.
|
||||
* @deprecated in favor of {@link RSocketInteractionModel}
|
||||
*/
|
||||
@Deprecated
|
||||
public enum Command {
|
||||
|
||||
/**
|
||||
* Perform {@link io.rsocket.RSocket#fireAndForget fireAndForget}.
|
||||
* @see RSocketRequester.RequestSpec#send()
|
||||
*/
|
||||
fireAndForget(RSocketInteractionModel.fireAndForget),
|
||||
|
||||
/**
|
||||
* Perform {@link io.rsocket.RSocket#requestResponse requestResponse}.
|
||||
* @see RSocketRequester.RequestSpec#retrieveMono
|
||||
*/
|
||||
requestResponse(RSocketInteractionModel.requestResponse),
|
||||
|
||||
/**
|
||||
* Perform {@link io.rsocket.RSocket#requestStream requestStream} or
|
||||
* {@link io.rsocket.RSocket#requestChannel requestChannel} depending on whether
|
||||
* the request input consists of a single or multiple payloads.
|
||||
* @see RSocketRequester.RequestSpec#retrieveFlux
|
||||
*/
|
||||
requestStreamOrChannel(RSocketInteractionModel.requestStream);
|
||||
|
||||
private final RSocketInteractionModel interactionModel;
|
||||
|
||||
Command(RSocketInteractionModel interactionModel) {
|
||||
this.interactionModel = interactionModel;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user