org.springframework.integration.ip.tcp
Interface SocketReader

All Known Implementing Classes:
AbstractSocketReader, NetSocketReader, NioSocketReader

public interface SocketReader

General interface for assembling message data from a TCP/IP Socket. Implementations for Socket and SocketChannel are provided.

Author:
Gary Russell

Method Summary
 boolean assembleData()
          Reads the data the socket and assembles packets of data into a complete message, depending on the format of that data.
 java.net.InetAddress getAddress()
          Returns the InetAddress of the underlying socket.
 byte[] getAssembledData()
          Retrieves the assembled tcp data or null if the data is not yet assembled.
 java.net.Socket getSocket()
           
 

Method Detail

assembleData

boolean assembleData()
                     throws java.io.IOException
Reads the data the socket and assembles packets of data into a complete message, depending on the format of that data.

Returns:
true when the message is assembled.
Throws:
java.io.IOException

getAssembledData

byte[] getAssembledData()
Retrieves the assembled tcp data or null if the data is not yet assembled. Once this method is called, the assembled data is again null until a new assembly is completed.

Returns:
The assembled data or null.

getAddress

java.net.InetAddress getAddress()
Returns the InetAddress of the underlying socket.

Returns:
The InetAddress.

getSocket

java.net.Socket getSocket()
Returns:
the Socket