io.pedestal.service.protocols

added in 0.8.0

PedestalConnector

protocol

A connector to an HTTP network adaptor, created from a service map.

The connector, once started, will handle incoming requests and outgoing responses, building on the interceptors and initial context provided in the service map.

members

start-connector!

(start-connector! this)

Starts (or restarts) the connector. If the :join? key of the service map is true, this method will block until the connector is stopped.

Invoking start-connector when the connector is already started results in connector-defined behavior.

Returns the connector.

stop-connector!

(stop-connector! this)

Stops the connector, if started. Does nothing if not started. This will unblock a thread that is blocked in start-connector.

Returns the connector.

test-request

(test-request this ring-request)

Test a Ring request map, returning a Ring response map.

This method will operate regardless of whether the connector is started or stopped.

The :body of the request must be nil, a String, a File, or an InputStream; likewise, in the returned response the :body will be nil or an InputStream.

ResponseBufferSize

protocol

Returns the buffer size of the response object; this protocol is adapted to the HTTPServletResponse object which is not a dependency available to the pedestal.service module.

members

response-buffer-size

(response-buffer-size this)

Returns the buffer size, in bytes, available to this response, or nil if it can not be determined.