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 0726489d1f..c852d4d36b 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 @@ -24,26 +24,58 @@ package org.springframework.integration.ip; * @author Dave Syer * @since 2.0 */ -public abstract class IpHeaders { +public final class IpHeaders { private static final String IP = "ip_"; private static final String TCP = IP + "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"; + /** + * The ip address from which a TCP message or UDP packet was received. + */ public static final String IP_ADDRESS = IP + "address"; + /** + * The remote port for a UDP packet. + */ public static final String PORT = IP + "port"; + /** + * 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"; + /** + * 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"; + /** + * A unique identifier for a TCP connection; set by the framework for + * inbound messages; when sending to a server-side inbound + * channel adapter, or replying to an inbound gateway, this header is + * required so the endpoint can determine which connection to send + * the message to. + */ public static final String CONNECTION_ID = IP + "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"; private IpHeaders() {} diff --git a/src/reference/docbook/ip.xml b/src/reference/docbook/ip.xml index 06717ad957..1ec149e446 100644 --- a/src/reference/docbook/ip.xml +++ b/src/reference/docbook/ip.xml @@ -626,7 +626,7 @@ For the inbound gateway, care must be taken to retain, or populate, the - ip_connnection_id header because it is used to + ip_connectionId header because it is used to correlate the message to a connection. Messages that originate at the gateway will automatically have the header set. If the reply is constructed as a new message, you will need to set the header. The @@ -760,7 +760,7 @@ On the server side, care must be taken to populate the - ip_connnection_id header because it is used to + ip_connectionId header because it is used to correlate the message to a connection. Messages that originate at the inbound adapter will automatically have the header set. If you wish to construct other messages to send, you will need to set the header. The @@ -1853,4 +1853,85 @@ +
+ IP Message Headers + + The following MessageHeaders are used by this module: + + + + + + + + + + Header Name + IpHeaders Constant + Description + + + + + ip_hostname + HOSTNAME + + The host name from which a TCP message or UDP packet was received. If + lookupHost is false, this will contain the ip address. + + + + ip_address + IP_ADDRESS + The ip address from which a TCP message or UDP packet was received. + + + ip_port + PORT + The remote port for a UDP packet. + + + ip_ackTo + ACKADDRESS + + The remote ip address to which UDP application-level acks will be sent. The + framework includes acknowledgment information in the data packet. + + + + ip_ackId + ACK_ID + + A correlation id for UDP application-level acks. The + framework includes acknowledgment information in the data packet. + + + + ip_tcp_remotePort + REMOTE_PORT + The remote port for a UDP packet. + + + ip_connectionId + CONNECTION_ID + + A unique identifier for a TCP connection; set by the framework for + inbound messages; when sending to a server-side inbound + channel adapter, or replying to an inbound gateway, this header is + required so the endpoint can determine which connection to send + the message to. + + + + ip_actualConnectionId + ACTUAL_CONNECTION_ID + + For information only - when using a cached or failover client connection + factory, contains the actual underlying connection id. + + + + +
+