Interface SocketServicer<R>

  • public interface SocketServicer<R>
    Services the Socket.
    Daniel Sagenschneider
    • Method Detail

      • service

        void service​(StreamBuffer<java.nio.ByteBuffer> readBuffer,
                     long bytesRead,
                     boolean isNewBuffer)
        Services the Socket.
        readBuffer - StreamBuffer containing the just read bytes. Note that this could be the same StreamBuffer as previous, with just further bytes written.
        bytesRead - Number of bytes read.
        isNewBuffer - Indicates if the StreamBuffer is a new StreamBuffer. Due to StreamBufferPool, the same StreamBuffer may be re-used. This flag indicates if a new StreamBuffer with new data, even if same StreamBuffer instance.
        Throws: - If fails to service the Socket. This indicates failure in servicing the connection and hence will close the connection.
      • release

        default void release()
        Releases this SocketServicer from use.