Top Description Methods
jakarta.servlet

public Interface WriteListener

extends EventListener
Imports
java.io.IOException, java.util.EventListener

Callback notification mechanism that signals to the developer it's possible to write content without blocking.
Since
Servlet 3.1

Method Summary

Modifier and TypeMethod and Description
public void
onError(final Throwable
the throwable to indicate why the write operation failed
t
)

Invoked when an error occurs writing data using the non-blocking APIs.

public void
onWritePossible()

When an instance of the WriteListener is registered with a ServletOutputStream, this method will be invoked by the container the first time when it is possible to write data.

Method Detail

onErrorback to summary
public void onError(final Throwable t)

Invoked when an error occurs writing data using the non-blocking APIs.

Parameters
t:Throwable

the throwable to indicate why the write operation failed

onWritePossibleback to summary
public void onWritePossible() throws IOException

When an instance of the WriteListener is registered with a ServletOutputStream, this method will be invoked by the container the first time when it is possible to write data. Subsequently the container will invoke this method if and only if the jakarta.servlet.ServletOutputStream#isReady() method has been called and has returned a value of false. a write operation has subsequently become possible and any previous call to this method has returned to the container.

Exceptions
IOException:
if an I/O related error has occurred during processing