Remove Legacy Metrics
- Simplify MBeans - instead of wrapping to expose lifecycle methods, implement `ManageableLifecycle`. Register an additional MBean for polled endpoints to control the lifecycle. * Polishing - Move `QueueChannel` `@ManagedAttribute`s to `QueueChannelOperations` - Make all `AbstractEndpoints` `IntegrationManagedResource`s and remove `ManagedEndpoint` to allow exposure of any `@Managed*` methods (including those on `Pausable`) - Revert to `Lifecycle` for classes that are not related to endpoints - Remove legacy metrics from docs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -19,8 +19,8 @@ package org.springframework.integration.ip;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketAddress;
|
||||
|
||||
import org.springframework.context.Lifecycle;
|
||||
import org.springframework.integration.handler.AbstractMessageHandler;
|
||||
import org.springframework.integration.support.management.ManageableLifecycle;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -29,8 +29,8 @@ import org.springframework.util.Assert;
|
||||
* @author Gary Russell
|
||||
* @since 2.0
|
||||
*/
|
||||
public abstract class AbstractInternetProtocolSendingMessageHandler extends AbstractMessageHandler implements CommonSocketOptions,
|
||||
Lifecycle {
|
||||
public abstract class AbstractInternetProtocolSendingMessageHandler extends AbstractMessageHandler
|
||||
implements CommonSocketOptions, ManageableLifecycle {
|
||||
|
||||
private final SocketAddress destinationAddress;
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ import org.springframework.integration.ip.tcp.connection.TcpConnectionFailedCorr
|
||||
import org.springframework.integration.ip.tcp.connection.TcpListener;
|
||||
import org.springframework.integration.ip.tcp.connection.TcpNioConnectionSupport;
|
||||
import org.springframework.integration.ip.tcp.connection.TcpSender;
|
||||
import org.springframework.integration.support.management.ManageableLifecycle;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageHandlingException;
|
||||
@@ -65,7 +66,7 @@ import org.springframework.util.concurrent.SettableListenableFuture;
|
||||
* @since 2.0
|
||||
*/
|
||||
public class TcpOutboundGateway extends AbstractReplyProducingMessageHandler
|
||||
implements TcpSender, TcpListener, Lifecycle {
|
||||
implements TcpSender, TcpListener, ManageableLifecycle {
|
||||
|
||||
private static final long DEFAULT_REMOTE_TIMEOUT = 10_000L;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -22,7 +22,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.Lifecycle;
|
||||
import org.springframework.integration.handler.AbstractMessageHandler;
|
||||
import org.springframework.integration.ip.IpHeaders;
|
||||
import org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory;
|
||||
@@ -33,6 +32,7 @@ import org.springframework.integration.ip.tcp.connection.ConnectionFactory;
|
||||
import org.springframework.integration.ip.tcp.connection.TcpConnection;
|
||||
import org.springframework.integration.ip.tcp.connection.TcpConnectionFailedCorrelationEvent;
|
||||
import org.springframework.integration.ip.tcp.connection.TcpSender;
|
||||
import org.springframework.integration.support.management.ManageableLifecycle;
|
||||
import org.springframework.integration.support.utils.IntegrationUtils;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandlingException;
|
||||
@@ -52,7 +52,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
*/
|
||||
public class TcpSendingMessageHandler extends AbstractMessageHandler implements
|
||||
TcpSender, Lifecycle, ClientModeCapable {
|
||||
TcpSender, ManageableLifecycle, ClientModeCapable {
|
||||
|
||||
/**
|
||||
* A default retry interval for the {@link ClientModeConnectionManager} rescheduling.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2019 the original author or authors.
|
||||
* Copyright 2001-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.
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.integration.ip.tcp.connection;
|
||||
|
||||
import org.springframework.context.Lifecycle;
|
||||
import org.springframework.integration.support.management.ManageableLifecycle;
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.context.Lifecycle;
|
||||
* @since 2.0
|
||||
*
|
||||
*/
|
||||
public interface ConnectionFactory extends Lifecycle {
|
||||
public interface ConnectionFactory extends ManageableLifecycle {
|
||||
|
||||
TcpConnection getConnection() throws InterruptedException;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user