org.mule.transport.tcp.protocols
Class CustomClassLoadingLengthProtocol

java.lang.Object
  extended by org.mule.transport.tcp.protocols.AbstractByteProtocol
      extended by org.mule.transport.tcp.protocols.DirectProtocol
          extended by org.mule.transport.tcp.protocols.LengthProtocol
              extended by org.mule.transport.tcp.protocols.CustomClassLoadingLengthProtocol
All Implemented Interfaces:
TcpProtocol

public class CustomClassLoadingLengthProtocol
extends LengthProtocol

A length protocol that uses a specific class loader to load objects from streams

Since:
2.2.6

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
CustomClassLoadingLengthProtocol()
           
 
Method Summary
 ClassLoader getClassLoader()
           
 Object read(InputStream is)
          Reads the input stream and returns a whole message.
 void setClassLoader(ClassLoader classLoader)
           
 
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, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomClassLoadingLengthProtocol

public CustomClassLoadingLengthProtocol()
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

getClassLoader

public ClassLoader getClassLoader()

setClassLoader

public void setClassLoader(ClassLoader classLoader)


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