Make Headers PREFIX Constants Public

**cherry-pick to 5.0.x**

* Make `IpHeaders` prefix as `public` as well

(cherry picked from commit 5ab7d24934)
This commit is contained in:
Gary Russell
2018-08-24 15:36:36 -04:00
committed by Artem Bilan
parent 9d954cc892
commit 989a1115ce
4 changed files with 40 additions and 30 deletions

View File

@@ -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";

View File

@@ -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";

View File

@@ -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() { }

View File

@@ -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();
}
}