Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.transport.tcp.protocols
Class MuleMessageLengthProtocol

    java.lang.Object
      org.mule.transport.tcp.protocols.AbstractByteProtocol
          org.mule.transport.tcp.protocols.DirectProtocol
              org.mule.transport.tcp.protocols.LengthProtocol
                  org.mule.transport.tcp.protocols.MuleMessageLengthProtocol

All Implemented Interfaces:
  TcpProtocol

    public class MuleMessageLengthProtocol

extends LengthProtocol

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 `LengthProtocol`.

Field Summary

Fields inherited from class org.mule.transport.tcp.protocols.LengthProtocol
`NO_MAX_LENGTH`

Fields inherited from class org.mule.transport.tcp.protocols.DirectProtocol
`bufferSize, UNLIMITED`

Fields inherited from class org.mule.transport.tcp.protocols.AbstractByteProtocol
`EOF, NO_STREAM, STREAM_OK`

Constructor Summary
`MuleMessageLengthProtocol()`

Method Summary
`Object` | `read(InputStream is)` Reads the input stream and returns a whole message.
`void` | `write(OutputStream os, Object unused)` Write the specified message to the output stream.

Methods inherited from class org.mule.transport.tcp.protocols.LengthProtocol
`getMaxMessageLength, isRepeat, setMaxMessageLength, writeByteArray`

Methods inherited from class org.mule.transport.tcp.protocols.DirectProtocol
`read, remaining`

Methods inherited from class org.mule.transport.tcp.protocols.AbstractByteProtocol
`copy, copy, createResponse, isRethrowExceptionOnRead, nullEmptyArray, safeRead, safeRead, setRethrowExceptionOnRead`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MuleMessageLengthProtocol

    public MuleMessageLengthProtocol()

Method Detail

### 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 `LengthProtocol`
  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 `AbstractByteProtocol`
  Parameters:
    `os` - the output stream to write to
    `unused` - the data to write
  Throws:
    `IOException` - if an exception occurs

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.