org.springframework.integration.ip.tcp
Class TcpNioSendingMessageHandler

java.lang.Object
  extended by org.springframework.integration.ip.AbstractInternetProtocolSendingMessageHandler
      extended by org.springframework.integration.ip.tcp.AbstractTcpSendingMessageHandler
          extended by org.springframework.integration.ip.tcp.TcpNioSendingMessageHandler
All Implemented Interfaces:
CommonSocketOptions, MessageHandler

public class TcpNioSendingMessageHandler
extends AbstractTcpSendingMessageHandler

Author:
Gary Russell

Field Summary
protected  java.lang.Class<NioSocketWriter> customSocketWriter
           
protected  java.nio.channels.SocketChannel socketChannel
           
protected  boolean usingDirectBuffers
           
 
Fields inherited from class org.springframework.integration.ip.tcp.AbstractTcpSendingMessageHandler
mapper, messageFormat, soKeepAlive, soLinger, soTcpNoDelay, soTrafficClass, writer
 
Fields inherited from class org.springframework.integration.ip.AbstractInternetProtocolSendingMessageHandler
destinationAddress, executorService, host, logger, port, soSendBufferSize, soTimeout
 
Constructor Summary
TcpNioSendingMessageHandler(java.lang.String host, int port)
           
 
Method Summary
protected  SocketWriter getWriter()
          Returns the socket writer after instantiating it, if necessary.
 void setCustomSocketWriterClassName(java.lang.String customSocketWriterClassName)
           
 void setUsingDirectBuffers(boolean usingDirectBuffers)
           
 
Methods inherited from class org.springframework.integration.ip.tcp.AbstractTcpSendingMessageHandler
doWrite, handleMessage, setMessageFormat, setSocketAttributes, setSoKeepAlive, setSoLinger, setSoTcpNoDelay, setSoTrafficClass
 
Methods inherited from class org.springframework.integration.ip.AbstractInternetProtocolSendingMessageHandler
getPort, setSoReceiveBufferSize, setSoSendBufferSize, setSoTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socketChannel

protected volatile java.nio.channels.SocketChannel socketChannel

usingDirectBuffers

protected boolean usingDirectBuffers

customSocketWriter

protected java.lang.Class<NioSocketWriter> customSocketWriter
Constructor Detail

TcpNioSendingMessageHandler

public TcpNioSendingMessageHandler(java.lang.String host,
                                   int port)
Parameters:
host -
port -
Method Detail

getWriter

protected SocketWriter getWriter()
Description copied from class: AbstractTcpSendingMessageHandler
Returns the socket writer after instantiating it, if necessary.

Specified by:
getWriter in class AbstractTcpSendingMessageHandler
Returns:
the socket

setUsingDirectBuffers

public void setUsingDirectBuffers(boolean usingDirectBuffers)
Parameters:
usingDirectBuffers - Set true if you wish to use direct buffers for NIO operations.

setCustomSocketWriterClassName

public void setCustomSocketWriterClassName(java.lang.String customSocketWriterClassName)
                                    throws java.lang.ClassNotFoundException
Parameters:
customSocketWriter - the customSocketWriter to set
Throws:
java.lang.ClassNotFoundException