org.mule.providers.tcp
Interface TcpProtocol

All Known Implementing Classes:
DefaultProtocol, EOFProtocol, LengthProtocol, XmlMessageProtocol

public interface TcpProtocol

The TcpProtocol interface enables to plug different application level protocols on a TcpConnector.

Version:
$Revision: 3798 $
Author:
Guillaume Nodet

Method Summary
 byte[] read(InputStream is)
          Reads the input stream and returns a whole message.
 void write(OutputStream os, byte[] data)
          Write the specified message to the output stream.
 

Method Detail

read

public byte[] read(InputStream is)
            throws IOException
Reads the input stream and returns a whole message.

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,
                  byte[] data)
           throws IOException
Write the specified message to the output stream.

Parameters:
os - the output stream to write to
data - the data to write
Throws:
IOException - if an exception occurs


Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.