checkstyle FinalClassCheck
fixes fixModifiers after fixFinal Revert CachingSessionFactory Class is spied in tests. checkstyle - Import Rules checkstyle InterfaceIsType checkstyle InnerTypeLast checkstyle OneStatementPerLine CovariantEquals OneTopLevelClass * Revert `'\n'` -> `System.lineSeparator()` in the Gradle scripts to meet Git `autocrlf = true` on Windows * Fix timing issue with the `LastModifiedFileListFilterTests`, when the `age = 1` might not be enough for the file object when we have some delay before checking
This commit is contained in:
committed by
Artem Bilan
parent
43af472c3a
commit
4ac3a79df7
@@ -479,7 +479,7 @@ public class ChannelPublishingJmsMessageListener
|
||||
* Internal class combining a destination name
|
||||
* and its target destination type (queue or topic).
|
||||
*/
|
||||
private static class DestinationNameHolder {
|
||||
private static final class DestinationNameHolder {
|
||||
|
||||
private final String name;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
*/
|
||||
public class DefaultJmsHeaderMapper implements JmsHeaderMapper {
|
||||
public class DefaultJmsHeaderMapper extends JmsHeaderMapper {
|
||||
|
||||
private static List<Class<?>> SUPPORTED_PROPERTY_TYPES = Arrays.asList(new Class<?>[] {
|
||||
Boolean.class, Byte.class, Double.class, Float.class, Integer.class, Long.class, Short.class, String.class });
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.integration.mapping.HeaderMapper;
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Gary Russell
|
||||
*/
|
||||
public interface JmsHeaderMapper extends HeaderMapper<Message> {
|
||||
public abstract class JmsHeaderMapper implements HeaderMapper<Message> {
|
||||
|
||||
String CONTENT_TYPE_PROPERTY = "content_type";
|
||||
|
||||
|
||||
@@ -1422,7 +1422,7 @@ public class JmsOutboundGateway extends AbstractReplyProducingMessageHandler imp
|
||||
}
|
||||
}
|
||||
|
||||
private class TimedReply {
|
||||
private final class TimedReply {
|
||||
|
||||
private final long timeStamp = System.currentTimeMillis();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -150,7 +150,7 @@ public class JmsSendingMessageHandler extends AbstractMessageHandler {
|
||||
}
|
||||
|
||||
|
||||
private static class HeaderMappingMessagePostProcessor implements MessagePostProcessor {
|
||||
private static final class HeaderMappingMessagePostProcessor implements MessagePostProcessor {
|
||||
|
||||
private final Message<?> integrationMessage;
|
||||
|
||||
|
||||
@@ -120,8 +120,55 @@ public class SubscribableJmsChannel extends AbstractJmsChannel implements Subscr
|
||||
this.dispatcher.setMaxSubscribers(this.maxSubscribers);
|
||||
}
|
||||
|
||||
/*
|
||||
* SmartLifecycle implementation (delegates to the MessageListener container)
|
||||
*/
|
||||
|
||||
private static class DispatchingMessageListener implements MessageListener {
|
||||
@Override
|
||||
public boolean isAutoStartup() {
|
||||
return (this.container != null) ? this.container.isAutoStartup() : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhase() {
|
||||
return (this.container != null) ? this.container.getPhase() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRunning() {
|
||||
return (this.container != null) ? this.container.isRunning() : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
if (this.container != null) {
|
||||
this.container.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
if (this.container != null) {
|
||||
this.container.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(Runnable callback) {
|
||||
if (this.container != null) {
|
||||
this.container.stop(callback);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
if (this.container != null) {
|
||||
this.container.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static final class DispatchingMessageListener implements MessageListener {
|
||||
|
||||
private final Log logger = LogFactory.getLog(this.getClass());
|
||||
|
||||
@@ -181,52 +228,4 @@ public class SubscribableJmsChannel extends AbstractJmsChannel implements Subscr
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SmartLifecycle implementation (delegates to the MessageListener container)
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean isAutoStartup() {
|
||||
return (this.container != null) ? this.container.isAutoStartup() : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhase() {
|
||||
return (this.container != null) ? this.container.getPhase() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRunning() {
|
||||
return (this.container != null) ? this.container.isRunning() : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
if (this.container != null) {
|
||||
this.container.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
if (this.container != null) {
|
||||
this.container.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(Runnable callback) {
|
||||
if (this.container != null) {
|
||||
this.container.stop(callback);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
if (this.container != null) {
|
||||
this.container.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -21,17 +21,20 @@ import java.util.Map;
|
||||
|
||||
import javax.jms.Message;
|
||||
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
import org.springframework.integration.jms.JmsHeaderMapper;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
* @author Gary Russell
|
||||
*/
|
||||
public class TestJmsHeaderMapper implements JmsHeaderMapper {
|
||||
public class TestJmsHeaderMapper extends JmsHeaderMapper {
|
||||
|
||||
@Override
|
||||
public void fromHeaders(MessageHeaders headers, Message target) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toHeaders(Message source) {
|
||||
Map<String, Object> headerMap = new HashMap<String, Object>();
|
||||
headerMap.put("testProperty", "foo");
|
||||
|
||||
Reference in New Issue
Block a user