public class NonBlockingWebResponse extends AbstractWebResponse
| Modifier and Type | Field and Description |
|---|---|
protected static byte[] |
END_MARKER |
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.atomic.AtomicBoolean |
lock |
protected java.util.LinkedList<byte[]> |
queue |
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, getProperty, getStatus, setHeader, setProperty, setStatusprotected static final byte[] END_MARKER
protected final java.util.concurrent.atomic.AtomicReference<java.lang.Throwable> error
protected final java.util.concurrent.atomic.AtomicBoolean listenerSet
protected final java.util.concurrent.atomic.AtomicBoolean lock
protected final java.util.LinkedList<byte[]> queue
protected final javax.servlet.WriteListener listener
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)