public class NonBlockingWebResponse extends AbstractWebResponse
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.atomic.AtomicReference<java.lang.Throwable> |
error |
protected javax.servlet.WriteListener |
listener |
protected java.util.concurrent.atomic.AtomicBoolean |
listenerSet |
protected java.util.concurrent.ConcurrentLinkedQueue<byte[]> |
queue |
protected java.util.concurrent.atomic.AtomicBoolean |
writting |
closed, out, properties, rsp| Constructor and Description |
|---|
NonBlockingWebResponse(javax.servlet.AsyncContext async) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToQueueAndSend(byte[] bytes) |
boolean |
end()
Completes the synchronous operation that was started on the request.
|
void |
send(byte[] bytes)
Writes b.length bytes of body from the specified byte array to the output
stream.
|
getHeader, getInternalObject, getProperty, getStatus, setHeader, setProperty, setStatusprotected final java.util.concurrent.atomic.AtomicReference<java.lang.Throwable> error
protected final java.util.concurrent.atomic.AtomicBoolean listenerSet
protected final java.util.concurrent.ConcurrentLinkedQueue<byte[]> queue
protected final javax.servlet.WriteListener listener
protected final java.util.concurrent.atomic.AtomicBoolean writting
public NonBlockingWebResponse(javax.servlet.AsyncContext async)
throws java.io.IOException
java.io.IOExceptionpublic void send(byte[] bytes)
throws java.io.IOException
send in interface WebResponsesend in class AbstractWebResponsebytes - the datajava.io.IOException - if an I/O error occurspublic boolean end()
end in interface WebResponseend in class AbstractWebResponseprotected void addToQueueAndSend(byte[] bytes)