diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/FileHeaders.java b/spring-integration-file/src/main/java/org/springframework/integration/file/FileHeaders.java index 3c75528852..763a579b72 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/FileHeaders.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/FileHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -26,7 +26,7 @@ package org.springframework.integration.file; */ public abstract class FileHeaders { - private static final String PREFIX = "file_"; + public static final String PREFIX = "file_"; public static final String FILENAME = PREFIX + "name"; diff --git a/spring-integration-http/src/main/java/org/springframework/integration/http/HttpHeaders.java b/spring-integration-http/src/main/java/org/springframework/integration/http/HttpHeaders.java index efd084b53a..a1a8525e05 100644 --- a/spring-integration-http/src/main/java/org/springframework/integration/http/HttpHeaders.java +++ b/spring-integration-http/src/main/java/org/springframework/integration/http/HttpHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2018 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. @@ -18,11 +18,12 @@ package org.springframework.integration.http; /** * @author Mark Fisher + * @author Gary Russell * @since 1.0.2 */ public abstract class HttpHeaders { - private static final String PREFIX = "http_"; + public static final String PREFIX = "http_"; public static final String REQUEST_URL = PREFIX + "requestUrl"; diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/IpHeaders.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/IpHeaders.java index 6457e7d143..6e486d87e3 100644 --- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/IpHeaders.java +++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/IpHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 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. @@ -23,51 +23,53 @@ package org.springframework.integration.ip; * @author Gary Russell * @author Dave Syer * @author Artem Bilan + * * @since 2.0 */ public final class IpHeaders { - private static final String IP = "ip_"; + /** + * The {@value IP_PREFIX} prefix for UDP and TCP headers. + */ + public static final String IP_PREFIX = "ip_"; - private static final String TCP = IP + "tcp_"; + /** + * The {@value TCP_PREFIX} prefix for TCP headers. + */ + private static final String TCP_PREFIX = IP_PREFIX + "tcp_"; /** * The host name from which a TCP message or UDP packet was received. If * {@code lookupHost} is {@code false}, this will contain the ip address. */ - public static final String HOSTNAME = IP + "hostname"; + public static final String HOSTNAME = IP_PREFIX + "hostname"; /** * The ip address from which a TCP message or UDP packet was received. */ - public static final String IP_ADDRESS = IP + "address"; + public static final String IP_ADDRESS = IP_PREFIX + "address"; /** * The remote port for a UDP packet. */ - public static final String PORT = IP + "port"; + public static final String PORT = IP_PREFIX + "port"; /** * The remote address for a UDP packet. */ - public static final String PACKET_ADDRESS = IP + "packetAddress"; + public static final String PACKET_ADDRESS = IP_PREFIX + "packetAddress"; /** * The remote ip address to which UDP application-level acks will be sent. The * framework includes acknowledgment information in the data packet. */ - public static final String ACK_ADDRESS = IP + "ackTo"; + public static final String ACK_ADDRESS = IP_PREFIX + "ackTo"; /** * A correlation id for UDP application-level acks. The * framework includes acknowledgment information in the data packet. */ - public static final String ACK_ID = IP + "ackId"; - - /** - * The remote port from which a TCP message was received. - */ - public static final String REMOTE_PORT = TCP + "remotePort"; + public static final String ACK_ID = IP_PREFIX + "ackId"; /** * A unique identifier for a TCP connection; set by the framework for @@ -76,19 +78,24 @@ public final class IpHeaders { * required so the endpoint can determine which connection to send * the message to. */ - public static final String CONNECTION_ID = IP + "connectionId"; + public static final String CONNECTION_ID = IP_PREFIX + "connectionId"; /** * For information only - when using a cached or failover client connection * factory, contains the actual underlying connection id. */ - public static final String ACTUAL_CONNECTION_ID = IP + "actualConnectionId"; + public static final String ACTUAL_CONNECTION_ID = IP_PREFIX + "actualConnectionId"; /** * The local address (InetAddress) that the socket is connected to. * @since 4.2.5. */ - public static final String LOCAL_ADDRESS = IP + "localInetAddress"; + public static final String LOCAL_ADDRESS = IP_PREFIX + "localInetAddress"; + + /** + * The remote port from which a TCP message was received. + */ + public static final String REMOTE_PORT = TCP_PREFIX + "remotePort"; private IpHeaders() { } diff --git a/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/support/MqttHeaders.java b/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/support/MqttHeaders.java index d1281929d6..6a843c2760 100644 --- a/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/support/MqttHeaders.java +++ b/spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/support/MqttHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 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. @@ -18,6 +18,7 @@ package org.springframework.integration.mqtt.support; /** * Spring Integration headers. + * * @author Gary Russell * * @since 4.0 @@ -25,23 +26,24 @@ package org.springframework.integration.mqtt.support; */ public final class MqttHeaders { - private static final String prefix = "mqtt_"; + public static final String PREFIX = "mqtt_"; - public static final String QOS = prefix + "qos"; + public static final String QOS = PREFIX + "qos"; - public static final String RECEIVED_QOS = prefix + "receivedQos"; + public static final String RECEIVED_QOS = PREFIX + "receivedQos"; - public static final String DUPLICATE = prefix + "duplicate"; + public static final String DUPLICATE = PREFIX + "duplicate"; - public static final String RETAINED = prefix + "retained"; + public static final String RETAINED = PREFIX + "retained"; - public static final String RECEIVED_RETAINED = prefix + "receivedRetained"; + public static final String RECEIVED_RETAINED = PREFIX + "receivedRetained"; - public static final String TOPIC = prefix + "topic"; + public static final String TOPIC = PREFIX + "topic"; - public static final String RECEIVED_TOPIC = prefix + "receivedTopic"; + public static final String RECEIVED_TOPIC = PREFIX + "receivedTopic"; private MqttHeaders() { throw new AssertionError(); } + }