ARTEMIS-1829 Remove deprecated plugin's messageExpired implementations

NotificationActiveMQServerPlugin and LoggingActiveMQServerPlugin are
implementing the deprecated version of
ActiveMQServerPlugin::messageExpired that is not called by the
new version of the method or any other part of the code

This fixing test org.apache.activemq.artemis.tests.integration.management.NotificationTest#testMessageExpired
This commit is contained in:
Francesco Nigro 2018-04-25 15:28:22 +02:00 committed by Clebert Suconic
parent e7f2dd39ac
commit 5b6a8d2b59
3 changed files with 7 additions and 10 deletions

View File

@ -566,7 +566,7 @@ public interface ActiveMQServerPlugin {
* @throws ActiveMQException
*/
default void messageExpired(MessageReference message, SimpleString messageExpiryAddress, ServerConsumer consumer) throws ActiveMQException {
messageExpired(message, messageExpiryAddress);
}
/**

View File

@ -595,15 +595,10 @@ public class LoggingActiveMQServerPlugin implements ActiveMQServerPlugin, Serial
}
}
/**
* A message has been expired
*
* @param message The expired message
* @param messageExpiryAddress The message expiry address if exists
* @throws ActiveMQException
*/
@Override
public void messageExpired(MessageReference message, SimpleString messageExpiryAddress) throws ActiveMQException {
public void messageExpired(MessageReference message,
SimpleString messageExpiryAddress,
ServerConsumer consumer) {
if (logAll || logInternalEvents) {
LoggingActiveMQServerPluginLogger.LOGGER.messageExpired(message, messageExpiryAddress);
}

View File

@ -139,7 +139,9 @@ public class NotificationActiveMQServerPlugin implements ActiveMQServerPlugin {
}
@Override
public void messageExpired(MessageReference message, SimpleString messageExpiryAddress) throws ActiveMQException {
public void messageExpired(MessageReference message,
SimpleString messageExpiryAddress,
ServerConsumer consumer) {
final ManagementService managementService = getManagementService();
if (managementService != null && sendExpiredNotifications) {