public class SafeProtocol extends Object implements TcpProtocol
Constructor and Description |
---|
SafeProtocol() |
Modifier and Type | Method and Description |
---|---|
ResponseOutputStream |
createResponse(Socket socket)
This lets protocols encode a response stream.
|
Object |
read(InputStream is)
Reads the input stream and returns a whole message.
|
void |
setMaxMessageLength(int maxMessageLength) |
void |
setObjectSerializer(ObjectSerializer objectSerializer) |
void |
write(OutputStream os,
Object data)
Write the specified message to the output stream.
|
public static final String COOKIE
public Object read(InputStream is) throws IOException
TcpProtocol
read
in interface TcpProtocol
is
- the input streamIOException
- if an exception occurspublic void write(OutputStream os, Object data) throws IOException
TcpProtocol
write
in interface TcpProtocol
os
- the output stream to write todata
- the data to writeIOException
- if an exception occurspublic ResponseOutputStream createResponse(Socket socket) throws IOException
TcpProtocol
createResponse
in interface TcpProtocol
socket
- The destination to write toIOException
public void setMaxMessageLength(int maxMessageLength)
@Inject public void setObjectSerializer(ObjectSerializer objectSerializer)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.