ApplicationCall
interface ApplicationCall
Represents a single act of communication between client and server.
Properties
abstract val application: Application Application being called |
|
abstract val attributes: Attributes Attributes attached to this instance |
|
abstract val parameters: Parameters Parameters associated with this call |
|
abstract val request: ApplicationRequest Client request |
|
abstract val response: ApplicationResponse Server response |
Extension Properties
val ApplicationCall.authentication: AuthenticationContext Retrieves an AuthenticationContext for |
|
val ApplicationCall.callId: String? A call id that is retrieved or generated by CallId feature or |
|
val ApplicationCall.locations: Locations Gets the Application.locations feature |
|
val ApplicationCall.sessions: CurrentSession Get current session or fail if no session feature installed |
Extension Functions
fun ApplicationCall.defaultTextContentType( Creates a default ContentType based on the given contentType and current call |
|
fun ApplicationCall.digestAuthenticationCredentials(): DigestCredential? Retrieves DigestCredential from this call |
|
fun <P : Principal> ApplicationCall.principal(): P? Retrieves authenticated Principal for |
|
fun ApplicationCall.push(pathAndQuery: String): Unit fun ApplicationCall.push( Produces HTTP/2 push from server to client or sets HTTP/1.x hint header or does nothing. Exact behaviour is up to engine implementation. fun ApplicationCall.push( Produces HTTP/2 push from server to client or sets HTTP/1.x hint header or does nothing (may call or not call block). Exact behaviour is up to engine implementation. |
|
suspend fun <T : Any> ApplicationCall.receive(): T suspend fun <T : Any> ApplicationCall.receive( suspend fun <T : Any> ApplicationCall.receive(type: KType): T Receives content for this request. |
|
suspend fun ApplicationCall.receiveChannel(): ByteReadChannel Receives channel content for this call. |
|
suspend fun ApplicationCall.receiveMultipart(): MultiPartData Receives multipart data for this call. |
|
suspend fun <T : Any> ApplicationCall.receiveOrNull(): T? suspend fun <T : Any> ApplicationCall.receiveOrNull( suspend fun <T : Any> ApplicationCall.receiveOrNull( Receives content for this request. |
|
suspend fun ApplicationCall.receiveParameters(): Parameters Receives form parameters for this call. |
|
suspend fun ApplicationCall.receiveStream(): InputStream Receives stream content for this call. |
|
suspend fun ApplicationCall.receiveText(): String Receives incoming content for this call as String. |
|
fun ApplicationCall.resolveResource( |
|
suspend fun ApplicationCall.respond(message: Any): Unit Sends a message as a response suspend fun ApplicationCall.respond( |
|
suspend fun ApplicationCall.respondBytes( Responds to a client with a raw bytes response, using specified provider to build a byte array suspend fun ApplicationCall.respondBytes( Responds to a client with a raw bytes response, using specified bytes |
|
suspend fun ApplicationCall.respondFile( Responds to a client with a contents of a file with the name fileName in the baseDir folder suspend fun ApplicationCall.respondFile( Responds to a client with a contents of a file |
|
suspend fun ApplicationCall.respondHtml( Responds to a client with a HTML response, using specified block to build an HTML page |
|
suspend fun <TTemplate : Template<HTML>> ApplicationCall.respondHtmlTemplate( |
|
suspend fun ApplicationCall.respondOutputStream( Respond with binary content producer. |
|
suspend fun ApplicationCall.respondRedirect( Responds to a client with a suspend fun ApplicationCall.respondRedirect( Responds to a client with a |
|
suspend fun ApplicationCall.respondTemplate( |
|
suspend fun ApplicationCall.respondTemplate( |
|
suspend fun ApplicationCall.respondTemplate( |
|
suspend fun ApplicationCall.respondTemplate( |
|
suspend fun ApplicationCall.respondTemplate( |
|
suspend fun ApplicationCall.respondText( Responds to a client with a plain text response, using specified text suspend fun ApplicationCall.respondText( Responds to a client with a plain text response, using specified provider to build a text |
|
suspend fun ApplicationCall.respondTextWriter( Respond with text content writer. |
|
fun ApplicationCall.suitableCharset( Detect suitable charset for an application call by |
|
fun ApplicationCall.url( Constructs a String with the url of a instance location whose class must be annotated with Location. |
|
fun ApplicationCall.url( Creates an url using current call’s schema, path and parameters as initial and then invokes block function on the url builder so amend parameters |
|
suspend fun ApplicationCall. Checks current etag value and pass it through conditions supplied by the remote client. Depends on conditions it produces 410 Precondition Failed or 304 Not modified responses when necessary. Otherwise sets ETag header and delegates to the block function |
Inheritors
abstract class BaseApplicationCall : ApplicationCall Base class for implementing an ApplicationCall. |
|
class RoutingApplicationCall : ApplicationCall Represents an application call being handled by Routing |