Helper functions to work with HttpServerExchange
.
Helper functions to work with `HttpServerExchange`.
(async-dispatch exchange expr)
Dispatches execution of task expr
to the XNIO worker thread pool. Required
for async operations with server exchange.
Dispatches execution of task `expr` to the XNIO worker thread pool. Required for async operations with server exchange.
(async-throw exchange throwable)
Rethrows throwable
in context of request handling to allow server to handle
error. Required for async operations with server exchange.
Rethrows `throwable` in context of request handling to allow server to handle error. Required for async operations with server exchange.
(get-existing-session exchange)
Returns session from the exchange
or nil if is not created.
Returns session from the `exchange` or nil if is not created.
(get-input-stream e)
Returns input stream for incomplete request. Starts blocking if necessary but does not check if running on IO thread.
Returns input stream for incomplete request. Starts blocking if necessary but does not check if running on IO thread.
(get-or-create-session exchange)
Return session from the exchange
, creates new session if necessary. Returns
nil
if session manager is not attached to the exchange
.
Return session from the `exchange`, creates new session if necessary. Returns `nil` if session manager is not attached to the `exchange`.
(get-session-config exchange)
Returns session config from the exchange
.
Returns session config from the `exchange`.
(get-session-manager exchange)
Returns session manager from exchange
.
Returns session manager from `exchange`.
(new-output-stream e)
Returns new output stream. Starts blocking if necessary.
Returns new output stream. Starts blocking if necessary.
(put-headers! header-map! headers)
Inserts map headers
into mutating header-map!
, returns nil
.
headers
are converted to string with str
.headers
overwrite existing keys in header-map
.nil
value remove headers from header-map
.Inserts map `headers` into mutating `header-map!`, returns `nil`. - All keys and values in `headers` are converted to string with `str`. - Sequential values are put as multiple headers. - Keys from `headers` overwrite existing keys in `header-map`. - Keys with `nil` value remove headers from `header-map`.
(sessions-enabled? exchange)
True if session manager is attached to the exchange
.
True if session manager is attached to the `exchange`.
(start-blocking* e)
Custom version of the startBlocking
method which avoids exception in
completed requests.
Custom version of the `startBlocking` method which avoids exception in completed requests.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close