Introduction
UDP 入站和出站通道适配器各提供两种类型:
Two flavors each of UDP inbound and outbound channel adapters are provided:
-
UnicastSendingMessageHandler
sends a datagram packet to a single destination. -
UnicastReceivingChannelAdapter
receives incoming datagram packets. -
MulticastSendingMessageHandler
sends (broadcasts) datagram packets to a multicast address. -
MulticastReceivingChannelAdapter
receives incoming datagram packets by joining to a multicast address.
提供了 TCP 入站和出站通道适配器:
TCP inbound and outbound channel adapters are provided:
-
TcpSendingMessageHandler
sends messages over TCP. -
TcpReceivingChannelAdapter
receives messages over TCP.
提供了入站 TCP 网关。它允许进行简单的请求响应处理。尽管网关可以支持任意数量的连接,但每个连接只能串行处理。从套接字读取的线程将等待并发送响应,然后重新读取。如果连接工厂配置为单用途连接,那么套接字超时后将关闭该连接。
An inbound TCP gateway is provided. It allows for simple request-response processing. While the gateway can support any number of connections, each connection can only be processed serially. The thread that reads from the socket waits for, and sends, the response before reading again. If the connection factory is configured for single use connections, the connection is closed after the socket times out.
提供了出站 TCP 网关。它允许进行简单的请求响应处理。如果关联的连接工厂配置为单用途连接,那么将立即为每个新请求创建一个新连接。否则,如果连接处于使用中,则调用线程将在连接上阻塞,直到接收到响应或者发生超时或 I/O 错误。
An outbound TCP gateway is provided. It allows for simple request-response processing. If the associated connection factory is configured for single-use connections, a new connection is immediately created for each new request. Otherwise, if the connection is in use, the calling thread blocks on the connection until either a response is received or a timeout or I/O error occurs.
TCP 和 UDP 入站通道适配器以及 TCP 入站网关支持 error-channel
属性。这提供了与 xref:gateway.adoc#gateway-proxy[Enter the GatewayProxyFactoryBean
中所述相同的基本功能。
The TCP and UDP inbound channel adapters and the TCP inbound gateway support the error-channel
attribute.
This provides the same basic functionality as described in Enter the GatewayProxyFactoryBean
.