Package net.officefloor.server
Interface SocketServicer<R>
-
public interface SocketServicer<R>
Services theSocket
.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
release()
Releases thisSocketServicer
from use.void
service(StreamBuffer<java.nio.ByteBuffer> readBuffer, long bytesRead, boolean isNewBuffer)
Services theSocket
.
-
-
-
Method Detail
-
service
void service(StreamBuffer<java.nio.ByteBuffer> readBuffer, long bytesRead, boolean isNewBuffer) throws java.io.IOException
Services theSocket
.- Parameters:
readBuffer
-StreamBuffer
containing the just read bytes. Note that this could be the sameStreamBuffer
as previous, with just further bytes written.bytesRead
- Number of bytes read.isNewBuffer
- Indicates if theStreamBuffer
is a newStreamBuffer
. Due toStreamBufferPool
, the sameStreamBuffer
may be re-used. This flag indicates if a newStreamBuffer
with new data, even if sameStreamBuffer
instance.- Throws:
java.io.IOException
- If fails to service theSocket
. This indicates failure in servicing the connection and hence will close the connection.
-
release
default void release()
Releases thisSocketServicer
from use.
-
-