S
- public abstract class MultiLineHandler<S extends ProtocolSession> extends Object implements LineHandler<S>
LineHandler
which will "buffer" the received lines till a point and the push them all at
one to the onLines(ProtocolSession, Collection)
methodConstructor and Description |
---|
MultiLineHandler() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
isReady(S session,
ByteBuffer line)
Return
true if the buffered lines are ready to get pushed to the onLines(ProtocolSession, Collection) method |
Response |
onLine(S session,
ByteBuffer line)
Processing the give line.
|
protected abstract Response |
onLines(S session,
Collection<ByteBuffer> lines)
Handle the buffered lines
|
public Response onLine(S session, ByteBuffer line)
LineHandler
ProtocolSession.getLineDelimiter()
delimiter.onLine
in interface LineHandler<S extends ProtocolSession>
session
- not nullprotected abstract boolean isReady(S session, ByteBuffer line)
true
if the buffered lines are ready to get pushed to the onLines(ProtocolSession, Collection)
methodsession
- line
- protected abstract Response onLines(S session, Collection<ByteBuffer> lines)
session
- lines
- Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.