org.mule.providers.tcp.protocols
Class EOFProtocol

java.lang.Object
  extended byorg.mule.providers.tcp.protocols.EOFProtocol
All Implemented Interfaces:
TcpProtocol

public class EOFProtocol
extends Object
implements TcpProtocol

The EOFProtocol class is an application level tcp protocol that does nothing. Reading is terminated by the stream being closed by the client

Version:
$Revision: 3798 $
Author:
Ross Mason

Constructor Summary
EOFProtocol()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOFProtocol

public EOFProtocol()
Method Detail

read

public byte[] 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
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
Description copied from interface: TcpProtocol
Write the specified message to the output stream.

Specified by:
write in interface TcpProtocol
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.