Package net.officefloor.server
Interface SocketServicer<R>
public interface SocketServicer<R>
Services the
Socket.- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidrelease()Releases thisSocketServicerfrom use.voidservice(StreamBuffer<ByteBuffer> readBuffer, long bytesRead, boolean isNewBuffer) Services theSocket.
-
Method Details
-
service
void service(StreamBuffer<ByteBuffer> readBuffer, long bytesRead, boolean isNewBuffer) throws IOException Services theSocket.- Parameters:
readBuffer-StreamBuffercontaining the just read bytes. Note that this could be the sameStreamBufferas previous, with just further bytes written.bytesRead- Number of bytes read.isNewBuffer- Indicates if theStreamBufferis a newStreamBuffer. Due toStreamBufferPool, the sameStreamBuffermay be re-used. This flag indicates if a newStreamBufferwith new data, even if sameStreamBufferinstance.- Throws:
IOException- If fails to service theSocket. This indicates failure in servicing the connection and hence will close the connection.
-
release
default void release()Releases thisSocketServicerfrom use.
-