org.mule.transport.tcp.protocols
Class MuleMessageSafeProtocol
java.lang.Object
org.mule.transport.tcp.protocols.SafeProtocol
org.mule.transport.tcp.protocols.MuleMessageSafeProtocol
- All Implemented Interfaces:
- TcpProtocol
public class MuleMessageSafeProtocol
- extends SafeProtocol
This Protocol will send the actual Mule Message over the TCP channel, and in this
way we are preserving any headers which might be needed, for example Correlation
IDs in order to be able to aggregate messages after chunking. Data are encoded
using SafeProtocol
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MuleMessageSafeProtocol
public MuleMessageSafeProtocol()
read
public Object read(InputStream is)
throws IOException
- Description copied from interface:
TcpProtocol
- Reads the input stream and returns a whole message.
- Specified by:
read
in interface TcpProtocol
- Overrides:
read
in class SafeProtocol
- Parameters:
is
- the input stream
- Returns:
- an array of byte containing a full message
- Throws:
IOException
- if an exception occurs
write
public void write(OutputStream os,
Object unused)
throws IOException
- Description copied from interface:
TcpProtocol
- Write the specified message to the output stream.
- Specified by:
write
in interface TcpProtocol
- Overrides:
write
in class SafeProtocol
- Parameters:
os
- the output stream to write tounused
- the data to write
- Throws:
IOException
- if an exception occurs
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.