Class NonBlockingWebResponse
java.lang.Object
services.moleculer.web.servlet.response.AbstractWebResponse
services.moleculer.web.servlet.response.NonBlockingWebResponse
- All Implemented Interfaces:
WebResponse
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AtomicReference<Throwable> protected final jakarta.servlet.WriteListenerprotected final AtomicBooleanprotected final ConcurrentLinkedQueue<byte[]> protected final AtomicBooleanFields inherited from class AbstractWebResponse
closed, out, properties, rsp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToQueueAndSend(byte[] bytes) booleanend()Completes the synchronous operation that was started on the request.voidsend(byte[] bytes) Writes b.length bytes of body from the specified byte array to the output stream.Methods inherited from class AbstractWebResponse
getHeader, getInternalObject, getProperty, getStatus, setHeader, setProperty, setStatus
-
Field Details
-
error
-
listenerSet
-
queue
-
listener
protected final jakarta.servlet.WriteListener listener -
writting
-
-
Constructor Details
-
NonBlockingWebResponse
- Throws:
IOException
-
-
Method Details
-
send
Writes b.length bytes of body from the specified byte array to the output stream.- Specified by:
sendin interfaceWebResponse- Overrides:
sendin classAbstractWebResponse- Parameters:
bytes- the data- Throws:
IOException- if an I/O error occurs
-
end
public boolean end()Completes the synchronous operation that was started on the request.- Specified by:
endin interfaceWebResponse- Overrides:
endin classAbstractWebResponse- Returns:
- return true, if any resources are released
-
addToQueueAndSend
protected void addToQueueAndSend(byte[] bytes)
-