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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractReader(AbstractHttpTransport.Context context, Promise<Void> promise)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods 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 failure)
-
-
-
Constructor Detail
-
AbstractReader
protected AbstractReader(AbstractHttpTransport.Context context, Promise<Void> promise)
-
-
Method Detail
-
onDataAvailable
public void onDataAvailable() throws IOException
- Specified by:
onDataAvailable
in interfacejavax.servlet.ReadListener
- Throws:
IOException
-
append
protected abstract void append(byte[] buffer, int offset, int length)
-
onAllDataRead
public void onAllDataRead() throws IOException
- Specified by:
onAllDataRead
in interfacejavax.servlet.ReadListener
- Throws:
IOException
-
finish
protected abstract String finish()
-
onError
public void onError(Throwable failure)
- Specified by:
onError
in interfacejavax.servlet.ReadListener
-
-