spring-framework / org.springframework.mock.web / MockAsyncContext

MockAsyncContext

open class MockAsyncContext : AsyncContext

Mock implementation of the AsyncContext interface.

Author
Rossen Stoyanchev

Since
3.2

Constructors

<init>

MockAsyncContext(request: ServletRequest, response: ServletResponse)

Functions

addDispatchHandler

open fun addDispatchHandler(handler: Runnable): Unit

addListener

open fun addListener(listener: AsyncListener): Unit
open fun addListener(listener: AsyncListener, request: ServletRequest, response: ServletResponse): Unit

complete

open fun complete(): Unit

createListener

open fun <T : AsyncListener> createListener(clazz: Class<T>): T

dispatch

open fun dispatch(): Unit
open fun dispatch(path: String): Unit
open fun dispatch(context: ServletContext, path: String): Unit

getDispatchedPath

open fun getDispatchedPath(): String

getListeners

open fun getListeners(): MutableList<AsyncListener>

getRequest

open fun getRequest(): ServletRequest

getResponse

open fun getResponse(): ServletResponse

getTimeout

open fun getTimeout(): Long

hasOriginalRequestAndResponse

open fun hasOriginalRequestAndResponse(): Boolean

setTimeout

open fun setTimeout(timeout: Long): Unit

start

open fun start(runnable: Runnable): Unit