@XmlHints(allowTopLevelDefinition=true) public class StreamingProtocol extends EOFProtocol
TcpProtocol that wraps an InputStream and does not consume it. This
allows the SocketOperations#send(RequesterConnection, RequesterConfig, Object, String, String, Message) to return a
Message with the original InputStream as payload.bufferSize, UNLIMITEDEOF, NO_MAX_LENGTH, NO_STREAM, objectSerializer, rethrowExceptionOnRead, STREAM_OK, streamOk| Constructor and Description |
|---|
StreamingProtocol() |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
read(InputStream is)
Reads the input stream and returns a whole message.
|
void |
write(OutputStream os,
Object data,
String encoding)
Write the specified message into the
OutputStream. |
isRepeatconsume, remainingcopy, copy, nullIfEmptyArray, safeRead, safeRead, setObjectSerializer, writeByteArraypublic InputStream read(InputStream is) throws IOException
read in interface TcpProtocolread in class DirectProtocolis - the input streamInputStream containing a full messageIOException - if an exception occurspublic void write(OutputStream os, Object data, String encoding) throws IOException
TcpProtocolOutputStream.write in interface TcpProtocolwrite in class DirectProtocolos - the OutputStream in which the data is going to be writtendata - data to be writtenencoding - in which the data will be serialized if its type is StringIOException - if an exception occursCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.