Package org.cometd.server.transport
Class AsyncJSONTransport.AbstractReader
java.lang.Object
org.cometd.server.transport.AsyncJSONTransport.AbstractReader
- All Implemented Interfaces:
EventListener
,javax.servlet.ReadListener
- Direct Known Subclasses:
AsyncJSONTransport.CharsetReader
,AsyncJSONTransport.UTF8Reader
- Enclosing class:
- AsyncJSONTransport
protected abstract class AsyncJSONTransport.AbstractReader extends Object implements javax.servlet.ReadListener
-
Field Summary
Fields Modifier and Type Field Description protected javax.servlet.AsyncContext
asyncContext
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractReader(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.AsyncContext asyncContext)
-
Method Summary
Modifier and Type Method Description protected abstract void
append(byte[] buffer, int offset, int length)
protected abstract String
finish()
void
onAllDataRead()
void
onDataAvailable()
void
onError(Throwable throwable)
protected void
process(String json)
-
Field Details
-
asyncContext
protected final javax.servlet.AsyncContext asyncContext
-
-
Constructor Details
-
AbstractReader
protected AbstractReader(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.AsyncContext asyncContext)
-
-
Method Details
-
onDataAvailable
- Specified by:
onDataAvailable
in interfacejavax.servlet.ReadListener
- Throws:
IOException
-
append
protected abstract void append(byte[] buffer, int offset, int length) -
onAllDataRead
- Specified by:
onAllDataRead
in interfacejavax.servlet.ReadListener
- Throws:
IOException
-
finish
-
process
- Throws:
IOException
-
onError
- Specified by:
onError
in interfacejavax.servlet.ReadListener
-