org.mule.providers.tcp.protocols
Class DefaultProtocol
java.lang.Object
org.mule.providers.tcp.protocols.DefaultProtocol
- All Implemented Interfaces:
- TcpProtocol
- public class DefaultProtocol
- extends Object
- implements TcpProtocol
The DefaultProtocol class is an application level tcp protocol that does nothing.
Reading is performed in reading the socket until no more bytes are available.
Writing simply writes the data to the socket.
- 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultProtocol
public DefaultProtocol()
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 todata - the data to write
- Throws:
IOException - if an exception occurs
Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.