diff --git a/spring-integration-core/src/main/java/org/springframework/integration/channel/interceptor/ObservationPropagationChannelInterceptor.java b/spring-integration-core/src/main/java/org/springframework/integration/channel/interceptor/ObservationPropagationChannelInterceptor.java deleted file mode 100644 index 97f32885fa..0000000000 --- a/spring-integration-core/src/main/java/org/springframework/integration/channel/interceptor/ObservationPropagationChannelInterceptor.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2022 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.channel.interceptor; - -import io.micrometer.common.lang.Nullable; -import io.micrometer.observation.Observation; -import io.micrometer.observation.ObservationRegistry; - -import org.springframework.aop.support.AopUtils; -import org.springframework.integration.channel.DirectChannel; -import org.springframework.messaging.Message; -import org.springframework.messaging.MessageChannel; -import org.springframework.messaging.MessageHandler; -import org.springframework.util.Assert; - -/** - * The {@link org.springframework.messaging.support.ExecutorChannelInterceptor} - * implementation responsible for an {@link Observation} propagation from one message - * flow's thread to another through the {@link MessageChannel}s involved in the flow. - * Opens a new {@link Observation.Scope} on another thread and cleans up it in the end. - *
- * NOTE: This interceptor is proven to be wrong since an existing observation usually is closed
- * on the sender side before the message is consumed on the receiver side.
- * Therefore, it is better to have a {@code sender} observation on this channel,
- * and then {@code receiver} observation on a subscriber for this channel.
- * This way a tracing information is stored into message headers passing this channel.
- * Such an approach also eliminate a problem with persistent message channels where
- * an {@link Observation} is not serializable to be stored into database as a part of the message.
- *
- * @author Artem Bilan
- *
- * @since 6.0
- *
- * @deprecated since 6.1.7 for removal in 6.4 in favor of enabling observation on the channel and its consumer.
- */
-@Deprecated(since = "6.1.7", forRemoval = true)
-public class ObservationPropagationChannelInterceptor extends ThreadStatePropagationChannelInterceptor
- * Script evaluation using the Jython implementation results in a
- *
- * This class isn't designed for target applications and typically is used from {@code ExpressionControlBusFactoryBean}.
- *
- * @author Mark Fisher
- * @author Artem Bilan
- * @author Gary Russell
- *
- * @since 4.0
- *
- * @deprecated in favor of {@link org.springframework.integration.support.management.ControlBusMethodFilter}
- */
-@Deprecated(since = "6.4", forRemoval = true)
-public class ControlBusMethodFilter implements MethodFilter {
-
- private static final ReflectionUtils.MethodFilter CONTROL_BUS_METHOD_FILTER =
- new org.springframework.integration.support.management.ControlBusMethodFilter();
-
- @Override
- public Listnull return
- * value for normal variable expressions such as x=2. As a work around, it is
- * necessary to get the value of 'x' explicitly following the script evaluation. This
- * class performs simple parsing on the last line of the script to obtain the variable
- * name, if any, and return its value.
- *
- * @author David Turanski
- * @author Gary Russell
- * @author Artem Bilan
- *
- * @since 2.1
- *
- * @deprecated in favor of {@link org.springframework.integration.scripting.PolyglotScriptExecutor}
- * with a {@code python} language argument.
- */
-@Deprecated(forRemoval = true, since = "6.4")
-public class PythonScriptExecutor extends AbstractScriptExecutor {
-
- public PythonScriptExecutor() {
- super("python");
- }
-
- @Override
- protected Object postProcess(Object result, ScriptEngine scriptEngine, String script, Bindings bindings) {
- Object newResult = result;
- if (newResult == null) {
- String returnVariableName = PythonVariableParser.parseReturnVariable(script);
- if (bindings != null) {
- newResult = bindings.get(returnVariableName);
- }
- if (newResult == null) {
- newResult = scriptEngine.get(returnVariableName);
- }
- }
- return newResult;
- }
-
- public static class PythonVariableParser {
-
- public static String parseReturnVariable(String script) {
- String[] lines = script.trim().split("\n");
- String lastLine = lines[lines.length - 1];
- String[] tokens = lastLine.split("=");
- return tokens[0].trim();
- }
-
- }
-
-}