public class ByteArrayRawSerializer extends AbstractByteArraySerializer
Because the socket must be closed to indicate message end, this (de)serializer can only be used by uni-directional (non-collaborating) channel adapters, and not by gateways.
Prior to 4.2.2, when using NIO, a timeout caused whatever had been partially received to be emitted as a message.
Now, a SocketTimeoutException
is thrown. To revert to the previous
behavior, set the treatTimeoutAsEndOfMessage
constructor argument to true.
logger, maxMessageSize
Constructor and Description |
---|
ByteArrayRawSerializer() |
ByteArrayRawSerializer(boolean treatTimeoutAsEndOfMessage)
Treat socket timeouts as a normal EOF and emit the (possibly partial)
message.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
deserialize(java.io.InputStream inputStream) |
void |
serialize(byte[] bytes,
java.io.OutputStream outputStream) |
checkClosure, copyToSizedArray, getMaxMessageSize, publishEvent, setApplicationEventPublisher, setMaxMessageSize
public ByteArrayRawSerializer()
public ByteArrayRawSerializer(boolean treatTimeoutAsEndOfMessage)
treatTimeoutAsEndOfMessage
- true to emit a message after a timeout.